mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 17:38:44 +00:00
fix crash in EGS when client asks to create an item with a sheet ID EGS doesn't know
by avoiding access the null item pointer outside the if(null) scope. --HG-- branch : develop
This commit is contained in:
parent
8b4d189c31
commit
5ea48c7599
1 changed files with 1 additions and 2 deletions
|
@ -233,6 +233,7 @@ CGameItemPtr CGameItemManager::createItem( const CSheetId& sheetId, uint16 quali
|
|||
// nlerror("<CGameItemManager::createItem> Can't find the owner item %s",owner.toString().c_str());
|
||||
// }
|
||||
// }
|
||||
log_Item_Create(item->getItemId(), item->getSheetId(), item->getStackSize(), item->quality());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -240,8 +241,6 @@ CGameItemPtr CGameItemManager::createItem( const CSheetId& sheetId, uint16 quali
|
|||
nlwarning("<CGameItemManager::createItem> Can't create an item with invalid sheet '%s'", sheetId.toString().c_str());
|
||||
}
|
||||
|
||||
log_Item_Create(item->getItemId(), item->getSheetId(), item->getStackSize(), item->quality());
|
||||
|
||||
return item;
|
||||
|
||||
} // createItem //
|
||||
|
|
Loading…
Reference in a new issue