Skip to content

Commit 3349ca9

Browse files
committed
allocate reference default type
1 parent f435a02 commit 3349ca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NativeScript/ffi/Interop.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ napi_value interop_bufferFromData(napi_env env, napi_callback_info info) {
810810
reference->type->toNative(env, argv[1], reference->data, &shouldFree, &shouldFree);
811811
}
812812
} else if (argc == 0) {
813-
reference->data = nullptr;
813+
reference->data = malloc(sizeof(void*));
814814
const char * typestr = "@";
815815
reference->type = TypeConv::Make(env, &typestr);
816816
reference->initValue = nullptr;

0 commit comments

Comments
 (0)