Skip to content

Commit

Permalink
Check we have a concrete OS handle in IO ops
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 26, 2018
1 parent 0f55183 commit 77e500c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/io/io.c
Expand Up @@ -6,6 +6,8 @@
static MVMOSHandle * verify_is_handle(MVMThreadContext *tc, MVMObject *oshandle, const char *op) {
if (REPR(oshandle)->ID != MVM_REPR_ID_MVMOSHandle)
MVM_exception_throw_adhoc(tc, "%s requires an object with REPR MVMOSHandle (got %s with REPR %s)", op, MVM_6model_get_debug_name(tc, oshandle), REPR(oshandle)->name);
if (!IS_CONCRETE(oshandle))
MVM_exception_throw_adhoc(tc, "%s requires a concrete MVMOSHandle, but got a type object", op);
return (MVMOSHandle *)oshandle;
}

Expand Down

0 comments on commit 77e500c

Please sign in to comment.