Fixed NPE when using !top before rankings are loaded

This commit is contained in:
shavit 2019-04-14 22:37:06 +03:00
parent ea670471d4
commit 7785053cc5

View File

@ -589,9 +589,12 @@ public Action Command_Rank(int client, int args)
} }
public Action Command_Top(int client, int args) public Action Command_Top(int client, int args)
{
if(gH_Top100Menu != null)
{ {
gH_Top100Menu.SetTitle("%T (%d)\n ", "Top100", client, gI_RankedPlayers); gH_Top100Menu.SetTitle("%T (%d)\n ", "Top100", client, gI_RankedPlayers);
gH_Top100Menu.Display(client, 60); gH_Top100Menu.Display(client, 60);
}
return Plugin_Handled; return Plugin_Handled;
} }