mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Fixed crash when prefab file doesnt exist in trenchbroom map
This commit is contained in:
@@ -16,8 +16,11 @@ namespace Nuake {
|
||||
Ref<Prefab> newPrefab = CreateRef<Prefab>();
|
||||
newPrefab->Path = path;
|
||||
|
||||
std::string prefabTextContent = FileSystem::ReadFile(path);
|
||||
newPrefab->Deserialize(prefabTextContent);
|
||||
if (FileSystem::FileExists(path, false))
|
||||
{
|
||||
std::string prefabTextContent = FileSystem::ReadFile(path);
|
||||
newPrefab->Deserialize(prefabTextContent);
|
||||
}
|
||||
|
||||
return newPrefab;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user