extra check if arrays have no content

This commit is contained in:
jenz 2024-06-30 00:36:12 +02:00
parent db3fe13dc8
commit 03952d76d3

View File

@ -267,6 +267,11 @@ public Action RandomizePing(Handle timer)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Action RandomizeNames(Handle timer) public Action RandomizeNames(Handle timer)
{ {
if (g_hNames.Length == 0 || g_hClanNames.Length == 0)
{
return Plugin_Handled;
}
ArrayList hNames = g_hNames.Clone(); ArrayList hNames = g_hNames.Clone();
ArrayList hClanNames = g_hClanNames.Clone(); ArrayList hClanNames = g_hClanNames.Clone();
for(int i = 1; i <= MaxClients; i++) for(int i = 1; i <= MaxClients; i++)