diff --git a/cs.c b/cs.c index a96b4354..e7e13b99 100644 --- a/cs.c +++ b/cs.c @@ -179,7 +179,7 @@ cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle) cs_err cs_close(csh *handle) { - if (*handle) + if (*handle == 0) // invalid handle return CS_ERR_CSH;