diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index 5be387750..3d92314b6 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -26,12 +26,12 @@ void CBooModel::ClearModelUniformCounters() CBooModel::~CBooModel() { - if (this == g_FirstModel) - g_FirstModel = nullptr; if (m_prev) m_prev->m_next = m_next; if (m_next) m_next->m_prev = m_prev; + if (this == g_FirstModel) + g_FirstModel = m_next; } CBooModel::CBooModel(TToken& token, std::vector* surfaces, SShader& shader,