]> git.saurik.com Git - wxWidgets.git/commitdiff
Restored previous revision after retag
authorJulian Smart <julian@anthemion.co.uk>
Sun, 24 Apr 2005 10:08:35 +0000 (10:08 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 24 Apr 2005 10:08:35 +0000 (10:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index f113a10f7e8475f18ffe5d95b8de1c768bad4c76..6fc526fac784654f5eee7e7921e9e83a67162873 100644 (file)
@@ -3601,7 +3601,11 @@ wxWindowMSW::MSWOnDrawItem(int WXUNUSED_UNLESS_ODRAWN(id),
     {
         wxMenuItem *pMenuItem = (wxMenuItem *)(pDrawStruct->itemData);
 
     {
         wxMenuItem *pMenuItem = (wxMenuItem *)(pDrawStruct->itemData);
 
-        wxCHECK_MSG( pMenuItem && pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)),
+        // see comment before the same test in MSWOnMeasureItem() below
+        if ( !pMenuItem )
+            return false;
+
+        wxCHECK_MSG( wxDynamicCast(pMenuItem, wxMenuItem),
                          false, _T("MSWOnDrawItem: bad wxMenuItem pointer") );
 
         // prepare to call OnDrawItem(): notice using of wxDCTemp to prevent
                          false, _T("MSWOnDrawItem: bad wxMenuItem pointer") );
 
         // prepare to call OnDrawItem(): notice using of wxDCTemp to prevent