From 5ea48c75995c30310c97ad1eb291725fa337b670 Mon Sep 17 00:00:00 2001 From: kishan_grimout Date: Mon, 29 May 2017 16:15:02 +0200 Subject: [PATCH] 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 --- .../game_item_manager/game_item_manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item_manager.cpp b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item_manager.cpp index 17d4d7d55..1124ce298 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item_manager.cpp @@ -233,6 +233,7 @@ CGameItemPtr CGameItemManager::createItem( const CSheetId& sheetId, uint16 quali // nlerror(" 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(" 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 //