mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 06:31:32 +00:00
feat(runtime-c-api) Do nothing if instance
is null in wasmer_instance_exports
.
This commit is contained in:
@ -372,6 +372,10 @@ pub unsafe extern "C" fn wasmer_instance_exports(
|
||||
instance: *mut wasmer_instance_t,
|
||||
exports: *mut *mut wasmer_exports_t,
|
||||
) {
|
||||
if instance.is_null() {
|
||||
return;
|
||||
}
|
||||
|
||||
let instance_ref = &mut *(instance as *mut Instance);
|
||||
let mut exports_vec: Vec<NamedExport> = Vec::with_capacity(instance_ref.exports().count());
|
||||
|
||||
|
Reference in New Issue
Block a user