Allow CloseHandle() on nulls.
This commit is contained in:
parent
68ab7f0a12
commit
db9ee5326a
@ -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)
|
static cell_t sm_CloseHandle(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
Handle_t hndl = static_cast<Handle_t>(params[1]);
|
Handle_t hndl = static_cast<Handle_t>(params[1]);
|
||||||
|
|
||||||
|
if (!hndl)
|
||||||
|
return 0;
|
||||||
|
|
||||||
HandleSecurity sec;
|
HandleSecurity sec;
|
||||||
|
|
||||||
sec.pIdentity = NULL;
|
sec.pIdentity = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user