From 2effba95049df244c3b6b328d47a0bb405fb9f9a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 17 Apr 2011 17:10:47 +0000 Subject: [PATCH] - Add NULL pointer to check to FWeaponSlot::PickWeapon() (for when this is called outside of a game). SVN r3186 (trunk) --- src/g_shared/a_weapons.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index e2aaab1c4..ecfa75d0d 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -757,6 +757,10 @@ AWeapon *FWeaponSlot::PickWeapon(player_t *player, bool checkammo) { int i, j; + if (player->mo == NULL) + { + return NULL; + } // Does this slot even have any weapons? if (Weapons.Size() == 0) {