mirror of
https://github.com/anope/anope.git
synced 2026-06-30 12:25:45 +02:00
Store modules in a list and xlines in a vector, not deques. We need to be able to keep iterators valid.
This commit is contained in:
+3
-6
@@ -116,13 +116,10 @@ Module::~Module()
|
||||
}
|
||||
}
|
||||
|
||||
for (std::deque<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it)
|
||||
std::list<Module *>::iterator it = std::find(Modules.begin(), Modules.end(), this);
|
||||
if (it != Modules.end())
|
||||
{
|
||||
if (*it == this)
|
||||
{
|
||||
Modules.erase(it);
|
||||
break;
|
||||
}
|
||||
Modules.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user