# HG changeset patch # User Grumpy7 # Date 1382687492 25200 # Node ID 02bc0fac639f63e2f83a7dceffd1fae8798e4a83 # Parent c193d289f0a5b0f6d54ca8e339c8c26961eb6a8e fixing inventory right click crash diff -r c193d289f0a5 -r 02bc0fac639f UI/UIPopup.cpp --- a/UI/UIPopup.cpp Thu Oct 24 23:22:46 2013 -0700 +++ b/UI/UIPopup.cpp Fri Oct 25 00:51:32 2013 -0700 @@ -1602,6 +1602,8 @@ pMouse->GetCursorPos(&cursor); int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1; + if (item_pid == -1) //added here to avoid crash + return; auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря)