From 0ff8256c40272a4d0fa990053f95a9e72c83ed5a Mon Sep 17 00:00:00 2001 From: silversurfer Date: Tue, 3 Nov 2015 12:34:31 +0000 Subject: [PATCH] Fix: When talking to a shopkeeper the game could crash with an assertion in Shopkeeper Interface.cpp line 990 because the temp vector wasn't initialized properly. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8000 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/ShopKeeper Interface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tactical/ShopKeeper Interface.cpp b/Tactical/ShopKeeper Interface.cpp index ee4dac006..ea5e19033 100644 --- a/Tactical/ShopKeeper Interface.cpp +++ b/Tactical/ShopKeeper Interface.cpp @@ -986,6 +986,10 @@ BOOLEAN EnterShopKeeperInterface() gfExitSKIDueToMessageBox = FALSE; } + // silversurfer: added this to prevent random crashes when the temp vector wasn't initialized properly. + // This is called in InitializeShopKeeper() a few lines below anyway so it shouldn't hurt here. + gpTempDealersInventory.clear(); + //Check to make sure the inventory is null ( should always be null if we are just coming in to the SKI ) Assert( gpTempDealersInventory.empty() == true );