mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix: missing pointer check
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9152 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1671,7 +1671,7 @@ void AddSoldierInitListMilitia( UINT8 ubNumGreen, UINT8 ubNumRegs, UINT8 ubNumEl
|
|||||||
// silversurfer: Replace body type. Militia tanks are not allowed.
|
// silversurfer: Replace body type. Militia tanks are not allowed.
|
||||||
if( curr->pBasicPlacement->fDetailedPlacement )
|
if( curr->pBasicPlacement->fDetailedPlacement )
|
||||||
{
|
{
|
||||||
if ( ARMED_VEHICLE( curr->pDetailedPlacement ) )
|
if ( curr->pDetailedPlacement && ARMED_VEHICLE( curr->pDetailedPlacement ) )
|
||||||
{
|
{
|
||||||
curr->pBasicPlacement->ubBodyType = PreRandom( REGFEMALE + 1 );
|
curr->pBasicPlacement->ubBodyType = PreRandom( REGFEMALE + 1 );
|
||||||
// check for better spot next to the tank so the militia doesn't get stuck in the tank
|
// check for better spot next to the tank so the militia doesn't get stuck in the tank
|
||||||
@@ -1680,7 +1680,7 @@ void AddSoldierInitListMilitia( UINT8 ubNumGreen, UINT8 ubNumRegs, UINT8 ubNumEl
|
|||||||
curr->pBasicPlacement->usStartingGridNo = iNewSpot;
|
curr->pBasicPlacement->usStartingGridNo = iNewSpot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( ARMED_VEHICLE( curr->pBasicPlacement ) )
|
else if ( curr->pBasicPlacement && ARMED_VEHICLE( curr->pBasicPlacement ) )
|
||||||
{
|
{
|
||||||
curr->pBasicPlacement->ubBodyType = PreRandom( REGFEMALE + 1 );
|
curr->pBasicPlacement->ubBodyType = PreRandom( REGFEMALE + 1 );
|
||||||
// check for better spot next to the tank so the militia doesn't get stuck in the tank
|
// check for better spot next to the tank so the militia doesn't get stuck in the tank
|
||||||
|
|||||||
Reference in New Issue
Block a user