SL-15778 Crash at getPreferredType() in findCategoryUUIDForTypeInRoot

master
Andrey Kleshchev 2021-08-06 22:53:06 +03:00
parent 1de9a6e32e
commit b111138d64
1 changed files with 2 additions and 1 deletions

View File

@ -487,7 +487,8 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
if(cats->at(i)->getPreferredType() == preferred_type)
LLViewerInventoryCategory* p_cat = cats->at(i);
if(p_cat && p_cat->getPreferredType() == preferred_type)
{
const LLUUID& folder_id = cats->at(i)->getUUID();
if (rv.isNull() || folder_id < rv)