From 66a0a93e17296ffc63fbc097c80e2f57d44faf40 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 8 Jun 2019 10:14:02 -0400 Subject: [PATCH] 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. --- src/HistoryWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/HistoryWindow.cpp b/src/HistoryWindow.cpp index 7640c7763..1fca50f90 100644 --- a/src/HistoryWindow.cpp +++ b/src/HistoryWindow.cpp @@ -24,6 +24,7 @@ undo memory so as to free up space. #include #include #include +#include #include #include #include @@ -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 ) {