core/reloader: ensure generation ptrs are removed on destroy

Broke things that used currentGeneration, and we shouldn't have a list
of dangling pointers anyway.
This commit is contained in:
outfoxxed 2024-09-13 04:18:52 -07:00
parent 5e2fb14551
commit 293341c9e1
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -94,6 +94,8 @@ void EngineGeneration::destroy() {
this->root->deleteLater();
this->root = nullptr;
} else {
g_generations.remove(this->engine);
// the engine has never been used, no need to clean up
delete this->engine;
this->engine = nullptr;