From 49d9fc10e40747f3851b9b66a3eb5f22da5d3fd4 Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Fri, 1 Aug 2008 21:04:03 +0000 Subject: [PATCH] added a number of NULL ptr asserts (#4145) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/framemanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 67b823f5dc..e3c9d07511 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -925,6 +925,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; @@ -1060,6 +1062,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) { @@ -1120,6 +1124,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) {