]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
wxParseWildcard added instead of methods hidden under wxUSE_FILEDLG and wxUSE_DIRDLG.
[wxWidgets.git] / src / common / tbarbase.cpp
index f2310dc1a912e1e92dfdf62172f7ae7efd2beeac..a2045d0f0cb83100c94b0eb4df98921deeb40bf9 100644 (file)
@@ -41,7 +41,7 @@
 #include "wx/toolbar.h"
 
 // ----------------------------------------------------------------------------
-// wxWindows macros
+// wxWidgets macros
 // ----------------------------------------------------------------------------
 
 BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
@@ -621,6 +621,12 @@ void wxToolBarBase::UpdateWindowUI(long flags)
 {
     wxWindowBase::UpdateWindowUI(flags);
 
+    // There is no sense in updating the toolbar UI
+    // if the parent window is about to get destroyed
+    wxWindow *tlw = wxGetTopLevelParent( this );
+    if (tlw && wxPendingDelete.Member( tlw ))
+        return;
+
     wxEvtHandler* evtHandler = GetEventHandler() ;
 
     for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();