mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fix: possible crash during item transformation
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8520 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -14304,7 +14304,10 @@ void TransformFromItemDescBox( TransformInfoStruct * Transform)
|
|||||||
gpItemDescObject->TransformObject( gpItemDescSoldier, gubItemDescStatusIndex, Transform, gpItemDescPrevObject );
|
gpItemDescObject->TransformObject( gpItemDescSoldier, gubItemDescStatusIndex, Transform, gpItemDescPrevObject );
|
||||||
|
|
||||||
// Check to see if we need to manually erase the ammo button.
|
// Check to see if we need to manually erase the ammo button.
|
||||||
UINT32 uiNewClass = Item[gpItemDescObject->usItem].usItemClass;
|
UINT32 uiNewClass = 0;
|
||||||
|
if ( gpItemDescObject )
|
||||||
|
uiNewClass = Item[gpItemDescObject->usItem].usItemClass;
|
||||||
|
|
||||||
BOOLEAN fEraseAmmoButton = FALSE;
|
BOOLEAN fEraseAmmoButton = FALSE;
|
||||||
if (uiOrigClass & IC_GUN && !(uiNewClass & IC_GUN))
|
if (uiOrigClass & IC_GUN && !(uiNewClass & IC_GUN))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user