]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/menu.cpp
added ctor taking wxFontFlags
[wxWidgets.git] / src / univ / menu.cpp
index 1a70ef1eb4320cc3f7a9a19a5c4fbf5d16aba4ec..62dc90a1c8b4e03feba697fb827ff9697898cddb 100644 (file)
@@ -314,6 +314,12 @@ wxPopupMenuWindow::wxPopupMenuWindow(wxWindow *parent, wxMenu *menu)
 
 wxPopupMenuWindow::~wxPopupMenuWindow()
 {
+    // When m_popupMenu in wxMenu is deleted because it
+    // is a child of an old menu bar being deleted (note: it does
+    // not get destroyed by the wxMenu destructor, but
+    // by DestroyChildren()), m_popupMenu should be reset to NULL.
+
+    m_menu->m_popupMenu = NULL;
 }
 
 // ----------------------------------------------------------------------------