Procházet zdrojové kódy

From Dušan Jocić: early out of treeview entries to prevent crashes
"when you change some item or remove, it does not resize the array and in that way it create problem with value"

Azaezel před 10 roky
rodič
revize
2238dd66da
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      Engine/source/gui/controls/guiTreeViewCtrl.cpp

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

@@ -4641,6 +4641,8 @@ S32 GuiTreeViewCtrl::findItemByValue(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]->getValue(),name) == 0)