]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_mdi.cpp
reversed change of rev 1.127: this resulted in bug 1175461 while the original bug...
[wxWidgets.git] / src / xrc / xh_mdi.cpp
index ef69b476a2d69806d526ba4f57652811e106e15c..7a581f80779374a2f9118030aabc84047d82b3e6 100644 (file)
@@ -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);