mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-18 03:02:07 +00:00
chore: add error handling for fastfile bind
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
|
||||
#include "ZoneLoading.h"
|
||||
|
||||
bool FastFileContext::LoadFastFile(const std::string& path)
|
||||
std::optional<Zone*> FastFileContext::LoadFastFile(const std::string& path)
|
||||
{
|
||||
m_loaded_zones.emplace_back(ZoneLoading::LoadZone(path));
|
||||
return true;
|
||||
auto zone = ZoneLoading::LoadZone(path);
|
||||
if (!zone)
|
||||
return std::nullopt;
|
||||
|
||||
return m_loaded_zones.emplace_back(std::move(zone)).get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user