return FALSE;
     
     MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
-    
+
     m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
     SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
-    
+
     wxModelessWindows.Append(this);
     
     return TRUE;
 wxFrame::~wxFrame()
 {
     m_isBeingDeleted = TRUE;
-    
     DeleteAllBars();
 }
 
 
 
 wxRadioBox::~wxRadioBox()
 {
+    m_isBeingDeleted = TRUE;
+
     wxRadioButton *next,*current;
     
     current=m_radioButtonCycle->NextInCycle();
 
     // generic
     InitBase();
 
+    m_isBeingDeleted = FALSE;
     m_backgroundTransparent = FALSE;
 
     // as all windows are created with WS_VISIBLE style...
         }
     }
 
+    m_isBeingDeleted = TRUE;
+    
 #ifndef __WXUNIVERSAL__
     // VS: make sure there's no wxFrame with last focus set to us:
     for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
 
         return FALSE;
     
     MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
-    
+
     m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
     SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
-    
+
     wxModelessWindows.Append(this);
     
     return TRUE;
 wxFrame::~wxFrame()
 {
     m_isBeingDeleted = TRUE;
-    
     DeleteAllBars();
 }
 
 
 
 wxRadioBox::~wxRadioBox()
 {
+    m_isBeingDeleted = TRUE;
+
     wxRadioButton *next,*current;
     
     current=m_radioButtonCycle->NextInCycle();
 
     // generic
     InitBase();
 
+    m_isBeingDeleted = FALSE;
     m_backgroundTransparent = FALSE;
 
     // as all windows are created with WS_VISIBLE style...
         }
     }
 
+    m_isBeingDeleted = TRUE;
+    
 #ifndef __WXUNIVERSAL__
     // VS: make sure there's no wxFrame with last focus set to us:
     for ( wxWindow *win = GetParent(); win; win = win->GetParent() )