Ticket #4480: fix.patch

File fix.patch, 768 bytes (added by wraitii, 7 years ago)

Tentative correct fix

  • source/simulation2/system/ComponentManager.cpp

    diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp
    index 9406def05e..723691135c 100644
    a b void CComponentManager::FlushDestroyedComponents()  
    921921            CMessageDestroy msg(ent);
    922922            PostMessage(ent, msg);
    923923
     924            // Some components may have dynamically unsubscribed on delete (though they really should not), so re-flatten.
     925            FlattenDynamicSubscriptions();
     926
    924927            // Destroy the components, and remove from m_ComponentsByTypeId:
    925928            std::map<ComponentTypeId, std::map<entity_id_t, IComponent*> >::iterator iit = m_ComponentsByTypeId.begin();
    926929            for (; iit != m_ComponentsByTypeId.end(); ++iit)