mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +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());
|
// 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
|
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());
|
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;
|
return item;
|
||||||
|
|
||||||
} // createItem //
|
} // createItem //
|
||||||
|
|
Loading…
Reference in a new issue