1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix crash when user tries to add a clothing item which doesn't exist.

We now check whether we got anything back from FindItemByName instead
of just handing off an empty item to AddItemsToCloset.
This commit is contained in:
2014-11-03 09:32:09 -08:00
parent 453d97701c
commit eb3680013e

View File

@ -6515,7 +6515,10 @@ PF_CONSOLE_CMD( Clothing, // Group name
items[0].fOptions.fTint1.Set(params[1], params[2], params[3], 1.f);
items[0].fOptions.fTint2.Set(params[4], params[5], params[6], 1.f);
plClothingMgr::GetClothingMgr()->AddItemsToCloset(items);
if (items[0].fItem)
plClothingMgr::GetClothingMgr()->AddItemsToCloset(items);
else
PrintString("The specified clothing item could not be found.");
}
PF_CONSOLE_CMD( Clothing, // Group name