]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for late redraw messages in a already destroyed window hierarchy
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 4 Mar 2004 07:18:36 +0000 (07:18 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 4 Mar 2004 07:18:36 +0000 (07:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/checklst.cpp
src/mac/checklst.cpp

index cb7c4a818f7e007c3cff9aa62d3262f43755f188..e934a70ec35b8ef840d960f0dbf16ffa7f4a3fa4 100644 (file)
@@ -69,16 +69,19 @@ static pascal void wxMacCheckListDefinition( short message, Boolean isSelected,
                                      Cell cell, short dataOffset, short dataLength,
                                      ListHandle listHandle )
 {
+    wxCheckListBox*          list;
+    list = (wxCheckListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
+    if ( list == NULL )
+        return ;
+    
     GrafPtr savePort;
     GrafPtr grafPtr;
     RgnHandle savedClipRegion;
     SInt32 savedPenMode;
-    wxCheckListBox*          list;
     GetPort(&savePort);
     SetPort((**listHandle).port);
     grafPtr = (**listHandle).port ;
     // typecast our refCon
-    list = (wxCheckListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
     
     //  Calculate the cell rect.
     
index cb7c4a818f7e007c3cff9aa62d3262f43755f188..e934a70ec35b8ef840d960f0dbf16ffa7f4a3fa4 100644 (file)
@@ -69,16 +69,19 @@ static pascal void wxMacCheckListDefinition( short message, Boolean isSelected,
                                      Cell cell, short dataOffset, short dataLength,
                                      ListHandle listHandle )
 {
+    wxCheckListBox*          list;
+    list = (wxCheckListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
+    if ( list == NULL )
+        return ;
+    
     GrafPtr savePort;
     GrafPtr grafPtr;
     RgnHandle savedClipRegion;
     SInt32 savedPenMode;
-    wxCheckListBox*          list;
     GetPort(&savePort);
     SetPort((**listHandle).port);
     grafPtr = (**listHandle).port ;
     // typecast our refCon
-    list = (wxCheckListBox*) GetControlReference( (ControlHandle) GetListRefCon(listHandle) );
     
     //  Calculate the cell rect.