Browse Source

Merge pull request #1199 from antonyjones67/development

Added NULL check in function findItemByName.
Daniel Buckmaster 10 years ago
parent
commit
686f8d04a5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Engine/source/gui/controls/guiTreeViewCtrl.cpp

+ 2 - 0
Engine/source/gui/controls/guiTreeViewCtrl.cpp

@@ -4624,6 +4624,8 @@ S32 GuiTreeViewCtrl::findItemByName(const char *name)
 {
    for (S32 i = 0; i < mItems.size(); i++) 
    {
+      if ( !mItems[i] )
+         continue;
 	   if( mItems[i]->mState.test( Item::InspectorData ) )
 		   continue;
       if (mItems[i] && dStrcmp(mItems[i]->getText(),name) == 0)