- Add NULL pointer to check to FWeaponSlot::PickWeapon() (for when this is called outside of a game).

SVN r3186 (trunk)
This commit is contained in:
Randy Heit 2011-04-17 17:10:47 +00:00
parent 619634c1f8
commit 2effba9504

View file

@ -757,6 +757,10 @@ AWeapon *FWeaponSlot::PickWeapon(player_t *player, bool checkammo)
{ {
int i, j; int i, j;
if (player->mo == NULL)
{
return NULL;
}
// Does this slot even have any weapons? // Does this slot even have any weapons?
if (Weapons.Size() == 0) if (Weapons.Size() == 0)
{ {