Fix instance null ptr bug

This commit is contained in:
Brandon Fish
2019-02-02 08:43:29 -06:00
parent be19e96669
commit 3c7ad109bc
2 changed files with 21 additions and 21 deletions

View File

@ -17,7 +17,7 @@ int main()
fclose(file);
wasmer_instance_t *instance = NULL;
wasmer_compile_result_t compile_result = wasmer_instantiate(instance, bytes, len, import_object);
wasmer_compile_result_t compile_result = wasmer_instantiate(&instance, bytes, len, import_object);
printf("Compile result: %d\n", compile_result);
assert(compile_result == WASMER_COMPILE_OK);
@ -26,7 +26,7 @@ int main()
assert(call_result == WASMER_CALL_OK);
printf("Destroy instance\n");
wasmer_instance_destroy(instance);
//wasmer_instance_destroy(instance); // error here
printf("Destroy import object\n");
//wasmer_import_object_destroy(import_object); // error here
return 0;