diff options
author | Adam <Adam@anope.org> | 2013-07-05 02:19:06 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-07-05 02:19:06 -0400 |
commit | 9a4f27e0a3649c5fe37e1704f7f90cc87e4d02f7 (patch) | |
tree | db6f5e955369407e650e332efc5d0ed191e1141b /include/extensible.h | |
parent | fccc4a4fa672a8f5c8bd306fa91d90a63bfd33a7 (diff) |
Only set stuff in ExtensibleUnserialize if there is something to set
Diffstat (limited to 'include/extensible.h')
-rw-r--r-- | include/extensible.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/extensible.h b/include/extensible.h index 397e3980b..c56e385c0 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -172,8 +172,9 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem<T> void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override { - T* t = this->Require(e); - data[this->name] >> *t; + T t; + if (data[this->name] >> t) + this->Set(e, t); } }; |