]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/winuniv.cpp
remove inline from declaration of functions which are not inline
[wxWidgets.git] / src / univ / winuniv.cpp
index 215d74028e69df8abce1db4f5b752813640b4179..24e2865a77c1de5e989876428d78de9a956469ce 100644 (file)
@@ -196,6 +196,14 @@ wxWindow::~wxWindow()
 {
     m_isBeingDeleted = true;
 
+#if wxUSE_SCROLLBAR
+    // clear pointers to scrollbar before deleting the children: they are
+    // children and so will be deleted by DestroyChildren() call below and if
+    // any code using the scrollbars would be called in the process or from
+    // ~wxWindowBase, the app would crash:
+    m_scrollbarVert = m_scrollbarHorz = NULL;
+#endif
+
     // we have to destroy our children before we're destroyed because our
     // children suppose that we're of type wxWindow, not just wxWindowNative,
     // and so bad things may happen if they're deleted from the base class dtor
@@ -1303,6 +1311,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event)
             }
 #endif // wxUSE_MENUS
 
+#if wxUSE_BUTTON
             // if it wasn't in a menu, try to find a button
             if ( command != -1 )
             {
@@ -1318,6 +1327,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event)
                     }
                 }
             }
+#endif // wxUSE_BUTTON
 
             // don't propagate accels from the child frame to the parent one
             break;