]> git.saurik.com Git - wxWidgets.git/commitdiff
readded window ptr check
authorBenjamin Williams <bwilliams@kirix.com>
Tue, 21 Nov 2006 09:02:13 +0000 (09:02 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Tue, 21 Nov 2006 09:02:13 +0000 (09:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index 7344576a2d0372dc45b0d3270d8a0aebe8150b18..f021d5d2805ab86cacd19a8f16605ef67c1c208c 100644 (file)
@@ -825,9 +825,13 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
     if (!window)
         return false;
 
+    // check if the window is already managed by us
+    if (GetPane(pane_info.window).IsOk())
+        return false;
+
+    // check if the pane name already exists, this could reveal a
+    // bug in the library user's application
     bool already_exists = false;
-    
-    // check if the pane already exists
     if (!pane_info.name.empty() && GetPane(pane_info.name).IsOk())
     {
         wxFAIL_MSG(wxT("A pane with that name already exists in the manager!"));