]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/sashwin.cpp
Ensure there is valid context for DrawRectangle
[wxWidgets.git] / src / generic / sashwin.cpp
index 547eefecf4f2451b98df07bfb0ebc133a612d980..0b8a17a8e477b58b6c6dfb3481861a052ebd2ee1 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "wx/laywin.h"
 
-wxDEFINE_EVENT( wxEVT_SASH_DRAGGED, wxSashEvent )
+wxDEFINE_EVENT( wxEVT_SASH_DRAGGED, wxSashEvent );
 
 IMPLEMENT_DYNAMIC_CLASS(wxSashWindow, wxWindow)
 IMPLEMENT_DYNAMIC_CLASS(wxSashEvent, wxCommandEvent)
@@ -115,8 +115,8 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
             // the area to draw on.
             wxWindow* parent = this;
 
-            while (parent && !parent->IsKindOf(CLASSINFO(wxDialog)) &&
-                             !parent->IsKindOf(CLASSINFO(wxFrame)))
+            while (parent && !wxDynamicCast(parent, wxDialog) &&
+                             !wxDynamicCast(parent, wxFrame))
               parent = parent->GetParent();
 
             wxScreenDC::StartDrawingOnTop(parent);