From c1fed7af99893fc581c15bca2bcdc0700fc55eea Mon Sep 17 00:00:00 2001 From: ChrisL Date: Mon, 24 Nov 2008 16:27:20 +0000 Subject: [PATCH] Fixed a CTD that occurs when you fail to attach an item. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2430 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Items.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 63784cd3..516b78ec 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -3730,8 +3730,11 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason ) DoAttachment((UINT8)ubStatusIndex); - UpdateAttachmentTooltips(gpItemDescObject, ubStatusIndex); - InternalInitEDBTooltipRegion(gpItemDescObject, guiCurrentItemDescriptionScreen); + if(gpItemDescObject != NULL) + { + UpdateAttachmentTooltips(gpItemDescObject, ubStatusIndex); + InternalInitEDBTooltipRegion(gpItemDescObject, guiCurrentItemDescriptionScreen); + } } } else @@ -3773,8 +3776,11 @@ void ItemDescAttachmentsCallback( MOUSE_REGION * pRegion, INT32 iReason ) UpdateItemHatches(); - UpdateAttachmentTooltips(gpItemDescObject, ubStatusIndex); - InternalInitEDBTooltipRegion(gpItemDescObject, guiCurrentItemDescriptionScreen); + if(gpItemDescObject != NULL) + { + UpdateAttachmentTooltips(gpItemDescObject, ubStatusIndex); + InternalInitEDBTooltipRegion(gpItemDescObject, guiCurrentItemDescriptionScreen); + } } } }