]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/framemanager.cpp
Upport scrolling changes and mouse wheel changes.
[wxWidgets.git] / src / aui / framemanager.cpp
index 30197f6d84bbe517ddf87317b4af332a8672e7b1..5ae4d181a1124849472bbba23bd3ad6343aed0e8 100644 (file)
@@ -511,11 +511,10 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
 
 wxAuiManager::~wxAuiManager()
 {
-    int i;
-    for (i = 0; i < m_panes.Count(); i++ )
+    for ( size_t i = 0; i < m_panes.size(); i++ )
     {
-        wxAuiPaneInfo& pinfo = m_panes.Item(i);
-        if (pinfo.window && pinfo.window->GetParent() == 0)
+        wxAuiPaneInfo& pinfo = m_panes[i];
+        if (pinfo.window && !pinfo.window->GetParent())
             delete pinfo.window;
     }
 
@@ -3541,6 +3540,10 @@ void wxAuiManager::OnFloatingPaneActivated(wxWindow* wnd)
 
 void wxAuiManager::OnRender(wxAuiManagerEvent& evt)
 {
+    // if the frame is about to be deleted, don't bother
+    if (!m_frame || wxPendingDelete.Member(m_frame))
+           return;
+        
     wxDC* dc = evt.GetDC();
 
 #ifdef __WXMAC__