2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-04 12:35:52 +00:00

Fix linked-list derp

This commit is contained in:
Jack Andersen 2016-09-08 18:23:36 -10:00
parent b6587d88fc
commit d8b141bcfa

View File

@ -26,12 +26,12 @@ void CBooModel::ClearModelUniformCounters()
CBooModel::~CBooModel() CBooModel::~CBooModel()
{ {
if (this == g_FirstModel)
g_FirstModel = nullptr;
if (m_prev) if (m_prev)
m_prev->m_next = m_next; m_prev->m_next = m_next;
if (m_next) if (m_next)
m_next->m_prev = m_prev; m_next->m_prev = m_prev;
if (this == g_FirstModel)
g_FirstModel = m_next;
} }
CBooModel::CBooModel(TToken<CModel>& token, std::vector<CBooSurface>* surfaces, SShader& shader, CBooModel::CBooModel(TToken<CModel>& token, std::vector<CBooSurface>* surfaces, SShader& shader,