Skip to content

Commit

Permalink
SecondaryInventory: Fix assert failure when pickpocketing
Browse files Browse the repository at this point in the history
The are NPCs who do not have an inventory, for example the Ylside guard
behind the passworded door in the Yellow Tulip.

Fixes: issue #1485
  • Loading branch information
dscharrer committed Jul 27, 2020
1 parent 7c9760c commit ff1efaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/hud/SecondaryInventory.cpp
Expand Up @@ -417,7 +417,9 @@ void SecondaryInventoryHud::dragEntity(Entity * io) {

void SecondaryInventoryHud::open(Entity * container) {

arx_assert(!container || container->inventory);
if(container && !container->inventory) {
container = NULL;
}

if(!container || SecondaryInventory == container->inventory) {
if(SecondaryInventory && SecondaryInventory->io)
Expand Down

0 comments on commit ff1efaa

Please sign in to comment.