- Fixed: PickNext/PrevWeapon() did not check for NULL player actors.

SVN r1046 (trunk)
This commit is contained in:
Randy Heit 2008-06-24 03:32:28 +00:00
parent 1462e5efa4
commit 9c6e40e192
2 changed files with 9 additions and 0 deletions

View file

@ -1,4 +1,5 @@
June 23, 2008 June 23, 2008
- Fixed: PickNext/PrevWeapon() did not check for NULL player actors.
- Fixed compilation issues with GCC. - Fixed compilation issues with GCC.
- Removed special case for nobotnodes in MAPINFO. - Removed special case for nobotnodes in MAPINFO.

View file

@ -733,6 +733,10 @@ AWeapon *PickNextWeapon (player_t *player)
{ {
int startslot, startindex; int startslot, startindex;
if (player->mo == NULL)
{
return NULL;
}
if (player->ReadyWeapon == NULL || FindMostRecentWeapon (player, &startslot, &startindex)) if (player->ReadyWeapon == NULL || FindMostRecentWeapon (player, &startslot, &startindex))
{ {
int start; int start;
@ -765,6 +769,10 @@ AWeapon *PickPrevWeapon (player_t *player)
{ {
int startslot, startindex; int startslot, startindex;
if (player->mo == NULL)
{
return NULL;
}
if (player->ReadyWeapon == NULL || FindMostRecentWeapon (player, &startslot, &startindex)) if (player->ReadyWeapon == NULL || FindMostRecentWeapon (player, &startslot, &startindex))
{ {
int start; int start;