1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

Fix crash opening History...

... This should have been done with commit 4abc71c

But the C style pointer casting (bad practice!) left the mistake compilable.

I reviewed all other casts to wxWindow* in the source and this was the only
bad one.
This commit is contained in:
Paul Licameli 2019-06-08 10:14:02 -04:00
parent d7e9d7a38e
commit 66a0a93e17

View File

@ -24,6 +24,7 @@ undo memory so as to free up space.
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/frame.h>
#include <wx/imaglist.h>
#include <wx/intl.h>
#include <wx/listctrl.h>
@ -37,6 +38,7 @@ undo memory so as to free up space.
#include "../images/Arrow.xpm"
#include "../images/Empty9x16.xpm"
#include "UndoManager.h"
#include "Project.h"
#include "ProjectManager.h"
#include "ShuttleGui.h"
@ -57,7 +59,7 @@ BEGIN_EVENT_TABLE(HistoryWindow, wxDialogWrapper)
END_EVENT_TABLE()
HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
wxDialogWrapper((wxWindow*)parent, wxID_ANY, wxString(_("History")),
wxDialogWrapper(FindProjectFrame( parent ), wxID_ANY, wxString(_("History")),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
{