From 510c9b78e304f279cf7091c9fca4f86a2072ffa8 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 28 Feb 2005 11:36:59 +0000 Subject: [PATCH] Applied patch [ 1121371 ] configtool NULL pointer accesses git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/configtool/src/configtooldoc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/configtool/src/configtooldoc.cpp b/utils/configtool/src/configtooldoc.cpp index 122bd5926a..2fad2cf31e 100644 --- a/utils/configtool/src/configtooldoc.cpp +++ b/utils/configtool/src/configtooldoc.cpp @@ -548,8 +548,11 @@ bool ctConfigToolDoc::DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent) /// Clear dependencies void ctConfigToolDoc::ClearDependencies(ctConfigItem* item) { - if (!item) + if (!item) { item = GetTopItem(); + if (!item) + return; + } item->GetDependents().Clear(); for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() ) @@ -569,6 +572,9 @@ void ctConfigToolDoc::RefreshDependencies() /// Refresh dependencies void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item) { + if (item==NULL) + return; + wxArrayString requiresArr; wxString requires = item->GetPropertyString(wxT("requires")); wxString precludes = item->GetPropertyString(wxT("precludes"));