]> git.saurik.com Git - wxWidgets.git/commitdiff
added a number of NULL ptr asserts (#4145)
authorBenjamin Williams <bwilliams@kirix.com>
Fri, 1 Aug 2008 21:04:31 +0000 (21:04 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Fri, 1 Aug 2008 21:04:31 +0000 (21:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index b4a4925f861fae9c8e7d8cebe67492a368da99d8..b06a6a519e2c27502043a908bf3da208e8bb8e83 100644 (file)
@@ -937,6 +937,8 @@ void wxAuiManager::SetArtProvider(wxAuiDockArt* art_provider)
 
 bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
 {
+    wxASSERT_MSG(window, wxT("NULL window ptrs are not allowed"));
+    
     // check if the pane has a valid window
     if (!window)
         return false;
@@ -1072,6 +1074,8 @@ bool wxAuiManager::AddPane(wxWindow* window,
 bool wxAuiManager::InsertPane(wxWindow* window, const wxAuiPaneInfo& pane_info,
                                 int insert_level)
 {
+    wxASSERT_MSG(window, wxT("NULL window ptrs are not allowed"));
+
     // shift the panes around, depending on the insert level
     switch (insert_level)
     {
@@ -1132,6 +1136,8 @@ bool wxAuiManager::InsertPane(wxWindow* window, const wxAuiPaneInfo& pane_info,
 // method will not destroy the window that is removed.
 bool wxAuiManager::DetachPane(wxWindow* window)
 {
+    wxASSERT_MSG(window, wxT("NULL window ptrs are not allowed"));
+
     int i, count;
     for (i = 0, count = m_panes.GetCount(); i < count; ++i)
     {