Allow CloseHandle() on nulls.

This commit is contained in:
David Anderson 2014-07-05 13:52:44 -07:00
parent 68ab7f0a12
commit db9ee5326a

View File

@ -53,6 +53,10 @@ static cell_t sm_IsValidHandle(IPluginContext *pContext, const cell_t *params)
static cell_t sm_CloseHandle(IPluginContext *pContext, const cell_t *params)
{
Handle_t hndl = static_cast<Handle_t>(params[1]);
if (!hndl)
return 0;
HandleSecurity sec;
sec.pIdentity = NULL;