don't clone database handle if it's 0

This commit is contained in:
rtldg 2022-05-26 00:35:58 +00:00
parent 7dddfe25f3
commit ed481b216c

View File

@ -1658,7 +1658,7 @@ public void Player_Death(Event event, const char[] name, bool dontBroadcast)
public int Native_GetDatabase(Handle handler, int numParams)
{
return view_as<int>(CloneHandle(gH_SQL, handler));
return gH_SQL ? view_as<int>(CloneHandle(gH_SQL, handler)) : 0;
}
public int Native_GetClientTime(Handle handler, int numParams)