From 9a4f27e0a3649c5fe37e1704f7f90cc87e4d02f7 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 5 Jul 2013 02:19:06 -0400 Subject: Only set stuff in ExtensibleUnserialize if there is something to set --- include/extensible.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') 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 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); } }; -- cgit