Fix issues with de/re-initialisation

This commit is contained in:
2023-09-18 15:13:14 +02:00
parent de75b6c724
commit 090e75a1ca
5 changed files with 7 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ namespace openVulkanoCpp::Scene
void Drawable::RemoveNode(Node* node)
{
Utils::Remove(m_nodes, node);
if (m_nodes.empty())
if (m_nodes.empty() && m_scene)
{
m_scene->RemoveDrawable(this);
m_scene = nullptr;