]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1121371 ] configtool NULL pointer accesses
authorJulian Smart <julian@anthemion.co.uk>
Mon, 28 Feb 2005 11:36:59 +0000 (11:36 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 28 Feb 2005 11:36:59 +0000 (11:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/configtool/src/configtooldoc.cpp

index 122bd5926a5e96496c01521ae427ea3769e073fa..2fad2cf31e2b847f29c905edbc1e25b075fb5a20 100644 (file)
@@ -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"));