Skip to content

Commit 948a58c

Browse files
committed
Fix a braino in NativeCallOps' converting into NQP objects.
1 parent 6e4050a commit 948a58c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,12 @@ private static SixModelObject toNQPType(ThreadContext tc, ArgType target, SixMod
195195
case UTF8STR:
196196
case UTF16STR:
197197
/* TODO: Handle encodings. */
198-
nqpobj.set_str(tc, (String) o);
198+
if (o != null) {
199+
nqpobj.set_str(tc, (String) o);
200+
}
201+
else {
202+
nqpobj = type;
203+
}
199204
break;
200205
case CPOINTER: {
201206
CPointerInstance cpointer = (CPointerInstance) nqpobj;

0 commit comments

Comments
 (0)