Fixed threaded queries not having an IQuery assignment

This commit is contained in:
David Anderson
2006-09-15 23:11:35 +00:00
parent 1f0778b14e
commit 57160763af
2 changed files with 10 additions and 6 deletions

View File

@@ -377,7 +377,8 @@ static cell AMX_NATIVE_CALL SQL_FieldNumToName(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL SQL_GetQueryString(AMX *amx, cell *params)
{
AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
if (!qInfo)
if (!qInfo || !qInfo->pQuery)
{
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
return 0;