]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
Permission for flood-fill code clarified
[wxWidgets.git] / src / common / popupcmn.cpp
index 5e6586bb3ccf48ec1c3504ce1afafc9fcd97acc7..150f81a92cba619d089a8bec466e1d75e8aaa8ab 100644 (file)
@@ -289,9 +289,10 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus)
     m_child->Connect(wxEVT_DESTROY,
                      wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
                      NULL, this);
-    m_focus->Connect(wxEVT_DESTROY,
-                     wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
-                     NULL, this);
+    if (m_focus)
+        m_focus->Connect(wxEVT_DESTROY,
+                         wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
+                         NULL, this);
 }
 
 bool wxPopupTransientWindow::Show( bool show )