Prevented crash on isValid on entity entity
This commit is contained in:
@@ -276,7 +276,6 @@ std::string FileSystem::GetFileNameFromPath(const std::string& path)
|
||||
return String::Split(split[split.size() - 1], '.')[0];
|
||||
}
|
||||
|
||||
|
||||
Directory::Directory(const std::string& path)
|
||||
{
|
||||
Files = std::vector<Ref<File>>();
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Nuake
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
return m_Scene->m_Registry.valid((entt::entity)GetHandle());
|
||||
return m_EntityHandle != (entt::entity)-1 && m_Scene->m_Registry.valid((entt::entity)GetHandle());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user