diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc index 8e51bd1e3a61..5912f3fce9d9 100644 --- a/runtime/lib/ffi_dynamic_library.cc +++ b/runtime/lib/ffi_dynamic_library.cc @@ -452,7 +452,7 @@ intptr_t FfiResolveInternal(const String& asset, // Native assets resolution. void* asset_result = FfiResolveAsset(thread, asset, symbol, error); - if (asset_result != nullptr) { + if (asset_result != nullptr || *error != nullptr) { return reinterpret_cast(asset_result); }