[nostalgia/core] Handle error in getting preload addr
This commit is contained in:
parent
517ffddf04
commit
b39a125264
@ -58,7 +58,8 @@ ox::Result<AssetRef<T>> readObj(Context *ctx, const ox::FileAddress &file,
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if constexpr(ox::preloadable<T>::value) {
|
if constexpr(ox::preloadable<T>::value) {
|
||||||
return AssetRef<T>{*reinterpret_cast<T*>(getPreloadAddr(ctx, file))};
|
oxRequire(addr, getPreloadAddr(ctx, file));
|
||||||
|
return AssetRef<T>(reinterpret_cast<const T*>(addr));
|
||||||
} else {
|
} else {
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user