Fix crash on hot-reload in Editor due to leftover scripting events in ScriptingEvents::EventsTable
#1925
This commit is contained in:
@@ -693,6 +693,14 @@ void BinaryModule::Destroy(bool isReloading)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove any scripting events
|
||||||
|
for (auto i = ScriptingEvents::EventsTable.Begin(); i.IsNotEnd(); ++i)
|
||||||
|
{
|
||||||
|
const ScriptingTypeHandle type = i->Key.First;
|
||||||
|
if (type.Module == this)
|
||||||
|
ScriptingEvents::EventsTable.Remove(i);
|
||||||
|
}
|
||||||
|
|
||||||
// Unregister
|
// Unregister
|
||||||
GetModules().RemoveKeepOrder(this);
|
GetModules().RemoveKeepOrder(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user