From d3c5df6750e5807675eb8f19b39ee1e2aa2b5b1a Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Sat, 10 Jan 2015 18:57:26 -0500 Subject: [PATCH] Broke up the creation of a wxDialog into two steps for easier debugging. --- src/wx/guiinit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 7e977f96..663c9fd5 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -2071,7 +2071,8 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name) wxString dname = wxString::FromUTF8(name); /* using this instead of LoadDialog() allows non-wxDialog classes that */ /* are derived from wxDialog (like wxPropertySheetDialog) to work */ - wxDialog * dialog = wxDynamicCast(wxXmlResource::Get()->LoadObject(this, dname, wxEmptyString), wxDialog); + wxObject * anObject = wxXmlResource::Get()->LoadObject(this, dname, wxEmptyString); + wxDialog * dialog = wxDynamicCast(anObject, wxDialog); CheckThrowXRCError(dialog,name); /* wx-2.9.1 doesn't set parent for propertysheetdialogs for some reason */