extensions/sdktools/extension.cpp
changeset 1767 b65f954f42d5
parent 1757 455a2ea38c67
child 1769 7a3f09643820
     1.1 --- a/extensions/sdktools/extension.cpp	Wed Dec 05 18:07:18 2007 +0000
     1.2 +++ b/extensions/sdktools/extension.cpp	Wed Dec 05 18:12:25 2007 +0000
     1.3 @@ -303,7 +303,14 @@
     1.4  		return true;
     1.5  	}
     1.6  
     1.7 -	IGamePlayer *pTarget = playerhelpers->GetGamePlayer(info->admin);
     1.8 +	IGamePlayer *pTarget = playerhelpers->GetGamePlayer(player_index);
     1.9 +
    1.10 +	if (pTarget == NULL)
    1.11 +	{
    1.12 +		info->reason = COMMAND_TARGET_NONE;
    1.13 +		info->num_targets = 0;
    1.14 +		return true;
    1.15 +	}
    1.16  
    1.17  	info->reason = playerhelpers->FilterCommandTarget(pAdmin, pTarget, info->flags);
    1.18  	if (info->reason != COMMAND_TARGET_VALID)