Remove crash on mangos from not unloaded objects on unload
This commit is contained in:
@@ -51,9 +51,11 @@ ElunaEventProcessor::~ElunaEventProcessor()
|
||||
RemoveEvents();
|
||||
|
||||
// In multithread get the object's map's lua state
|
||||
Eluna* E = obj ? sEluna : sEluna;
|
||||
EventMgr::WriteGuard lock(E->eventMgr->GetLock());
|
||||
E->eventMgr->processors.erase(this);
|
||||
if (Eluna* E = obj ? sEluna : sEluna)
|
||||
{
|
||||
EventMgr::WriteGuard lock(E->eventMgr->GetLock());
|
||||
E->eventMgr->processors.erase(this);
|
||||
}
|
||||
}
|
||||
|
||||
void ElunaEventProcessor::Update(uint32 diff)
|
||||
|
||||
Reference in New Issue
Block a user