Fix crash in AOEngine::createAnimationLink()

Tue, 05 Dec 2017 11:09:51 +0100

author
Ansariel
date
Tue, 05 Dec 2017 11:09:51 +0100
changeset 53542
03dc54d18896
parent 53541
240f9ecbaf96
child 53543
98cc3f892231

Fix crash in AOEngine::createAnimationLink()

indra/newview/aoengine.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/aoengine.cpp	Mon Dec 04 23:28:40 2017 +0100
     1.2 +++ b/indra/newview/aoengine.cpp	Tue Dec 05 11:09:51 2017 +0100
     1.3 @@ -793,14 +793,17 @@
     1.4  		LLInventoryModel::cat_array_t* cats;
     1.5  		gInventory.getDirectDescendentsOf(set->getInventoryUUID(), cats, items);
     1.6  
     1.7 -		for (S32 index = 0; index < cats->size(); ++index)
     1.8 +		if (cats)
     1.9  		{
    1.10 -			if (cats->at(index)->getName().compare(state->mName) == 0)
    1.11 +			for (S32 index = 0; index < cats->size(); ++index)
    1.12  			{
    1.13 -				LL_DEBUGS("AOEngine") << "UUID found!" << LL_ENDL;
    1.14 -				newStateFolderUUID = cats->at(index)->getUUID();
    1.15 -				state->mInventoryUUID = newStateFolderUUID;
    1.16 -				break;
    1.17 +				if (cats->at(index)->getName().compare(state->mName) == 0)
    1.18 +				{
    1.19 +					LL_DEBUGS("AOEngine") << "UUID found!" << LL_ENDL;
    1.20 +					newStateFolderUUID = cats->at(index)->getUUID();
    1.21 +					state->mInventoryUUID = newStateFolderUUID;
    1.22 +					break;
    1.23 +				}
    1.24  			}
    1.25  		}
    1.26  	}

mercurial