]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
open registry keys in read-only mode as we might not have the rights for full access...
[wxWidgets.git] / src / common / tbarbase.cpp
index f2310dc1a912e1e92dfdf62172f7ae7efd2beeac..d2243fedf2cd3b1f25719b798484aaa997b5dff1 100644 (file)
@@ -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();