fixed a bug where failed or non-thiscall sdkcalls would crash on EndSDKPrepCall

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40974
This commit is contained in:
David Anderson 2007-06-17 06:34:57 +00:00
parent df9a745c04
commit 47e3056111

View File

@ -186,13 +186,16 @@ static cell_t EndPrepSDKCall(IPluginContext *pContext, const cell_t *params)
vc = CreateValveCall(s_call_addr, s_vcalltype, s_has_return ? &s_return : NULL, s_params, s_numparams);
}
vc->thisinfo->decflags |= VDECODE_FLAG_BYREF;
if (!vc)
{
return BAD_HANDLE;
}
if (vc->thisinfo)
{
vc->thisinfo->decflags |= VDECODE_FLAG_BYREF;
}
Handle_t hndl = handlesys->CreateHandle(g_CallHandle, vc, pContext->GetIdentity(), myself->GetIdentity(), NULL);
if (!hndl)
{