X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4791fafb6d69dda73abc0a92c6a9ab19ce13801a..f60b1d829dd8a6d5e47a2adcd3690acb3bd10150:/src/xrc/xh_mdi.cpp diff --git a/src/xrc/xh_mdi.cpp b/src/xrc/xh_mdi.cpp index ef69b476a2..7a581f8077 100644 --- a/src/xrc/xh_mdi.cpp +++ b/src/xrc/xh_mdi.cpp @@ -105,10 +105,11 @@ wxObject *wxMdiXmlHandler::DoCreateResource() frame->SetClientSize(GetSize()); if (HasParam(wxT("pos"))) frame->Move(GetPosition()); - if (HasParam(wxT("icon")) && frame->IsKindOf(CLASSINFO(wxFrame))) + if (HasParam(wxT("icon"))) { - wxFrame* f = wxDynamicCast(f, wxFrame); - f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON)); + wxFrame* f = wxDynamicCast(frame, wxFrame); + if (f) + f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON)); } SetupWindow(frame);