From: Julian Smart <julian@anthemion.co.uk>
Date: Mon, 28 Feb 2005 11:36:59 +0000 (+0000)
Subject: Applied patch [ 1121371 ] configtool NULL pointer accesses
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/510c9b78e304f279cf7091c9fca4f86a2072ffa8

Applied patch [ 1121371 ] configtool NULL pointer accesses


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

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"));