1
0
mirror of https://github.com/anope/anope.git synced 2026-06-24 10:16:37 +02:00

Put serialized_items on the heap to prevent weird crashes on shutdown from the list being destructed before members in it

This commit is contained in:
Adam
2011-10-10 15:04:23 -04:00
parent 9f3d735d9d
commit 80f4f317b2
5 changed files with 24 additions and 25 deletions
+4 -1
View File
@@ -113,8 +113,11 @@ class DBSQL : public Module
return EVENT_CONTINUE;
}
if (serialized_items == NULL)
return EVENT_CONTINUE;
std::map<Anope::string, SerializableBase::serialized_data> table_layout;
for (std::list<SerializableBase *>::iterator it = serialized_items.begin(), it_end = serialized_items.end(); it != it_end; ++it)
for (std::list<SerializableBase *>::iterator it = serialized_items->begin(), it_end = serialized_items->end(); it != it_end; ++it)
{
SerializableBase *base = *it;
SerializableBase::serialized_data data = base->serialize();