Applied patch [ 1121371 ] configtool NULL pointer accesses

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-02-28 11:36:59 +00:00
parent 84aa68c427
commit 510c9b78e3

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