diff options
| author | Adam <Adam@anope.org> | 2012-10-18 20:06:02 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-10-18 20:06:02 -0400 |
| commit | 727c3d5b7513a909038553a227552a33dc52d885 (patch) | |
| tree | 088af36ee6bcf9ea303fde68e449cfb963412f5c | |
| parent | eddb7684c1b3608d0502535e9426dd586a5c173d (diff) | |
Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated
| -rw-r--r-- | include/regchannel.h | 3 | ||||
| -rw-r--r-- | src/regchannel.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/regchannel.h b/include/regchannel.h index 0f5bb022a..12ef308b4 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -163,7 +163,8 @@ struct CoreExport LogSetting : Serializable static Serializable* unserialize(Serializable *obj, Serialize::Data &); }; -class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, CI_END>, public Serializable +/* It matters that Base is here before Extensible (it is inherited by Serializable) */ +class CoreExport ChannelInfo : public Serializable, public Extensible, public Flags<ChannelInfoFlag, CI_END> { private: serialize_obj<NickCore> founder; /* Channel founder */ diff --git a/src/regchannel.cpp b/src/regchannel.cpp index ccb2235b3..c507a4277 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -226,7 +226,7 @@ Serializable* LogSetting::unserialize(Serializable *obj, Serialize::Data &data) /** Default constructor * @param chname The channel name */ -ChannelInfo::ChannelInfo(const Anope::string &chname) : Flags<ChannelInfoFlag, CI_END>(ChannelInfoFlagStrings), Serializable("ChannelInfo"), +ChannelInfo::ChannelInfo(const Anope::string &chname) : Serializable("ChannelInfo"), Flags<ChannelInfoFlag, CI_END>(ChannelInfoFlagStrings), access("ChanAccess"), akick("AutoKick"), badwords("BadWord"), mode_locks("ModeLock"), log_settings("LogSetting"), botflags(BotServFlagStrings) { |
