diff --git a/openVulkanoCpp/Host/Apple/BundledResoureLoaderIos.mm b/openVulkanoCpp/Host/Apple/BundledResoureLoaderIos.mm index a6e04ec..603dacb 100644 --- a/openVulkanoCpp/Host/Apple/BundledResoureLoaderIos.mm +++ b/openVulkanoCpp/Host/Apple/BundledResoureLoaderIos.mm @@ -22,9 +22,10 @@ namespace OpenVulkano { auto [fileName, fileType] = Utils::SplitAtLastOccurrence(resourceName, '.'); NSString* filePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithUTF8String:fileName.c_str()] ofType:[NSString stringWithUTF8String:fileType.c_str()]]; - return Utils::ReadFile(std::string([filePath UTF8String])); + if (filePath) + return Utils::ReadFile(std::string([filePath UTF8String])); } Logger::FILESYS->warn("Failed to find resource: '{}' in bundle", resourceName); - return {0}; + return {}; } }