minor fixes to errors mentioned

This commit is contained in:
jenz 2023-09-02 16:20:31 +02:00
parent be2c2797ab
commit a4b527ea22
2 changed files with 12 additions and 1 deletions

View File

@ -1878,6 +1878,15 @@ NominateResult InternalNominateMap(char[] map, int owner)
} }
} }
if (g_NominateList[owner] == INVALID_HANDLE)
{
if (IsClientConnected(owner) && IsClientInGame(owner))
{
ReplyToCommand(owner, "This should be invalid.");
}
return Nominate_InvalidMap;
}
PushArrayString(g_NominateList[owner], map); PushArrayString(g_NominateList[owner], map);
PushArrayCell(g_NominateOwners, owner); //maybe i only want to do this for the first nomination of each client PushArrayCell(g_NominateOwners, owner); //maybe i only want to do this for the first nomination of each client
if(owner == 0 && g_NominateReservedCount < GetVoteSize(1)) if(owner == 0 && g_NominateReservedCount < GetVoteSize(1))

View File

@ -174,7 +174,7 @@ public void sql_select_hiding_unavailable_maps(int client)
public void SQL_OnQueryCompleted_ignoring(Database db, DBResultSet results, const char[] error, int Serial) public void SQL_OnQueryCompleted_ignoring(Database db, DBResultSet results, const char[] error, int Serial)
{ {
if (!db) if (!db || results == INVALID_HANDLE)
{ {
delete results; delete results;
return; return;
@ -189,7 +189,9 @@ public void SQL_OnQueryCompleted_ignoring(Database db, DBResultSet results, cons
{ {
int val = 0; int val = 0;
if (results.RowCount && results.FetchRow()) if (results.RowCount && results.FetchRow())
{
val = results.FetchInt(0); val = results.FetchInt(0);
}
if (val == 1) if (val == 1)
{ {
g_bClientsIgnoring[client] = true; g_bClientsIgnoring[client] = true;