summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/tags.cc1
2 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index f25858a518..b1dd2696b0 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2450,7 +2450,9 @@ void monsters::init_with(const monsters &mon)
god = mon.god;
if (mon.ghost.get())
- ghost.reset( new ghost_demon( *mon.ghost ) );
+ ghost.reset(new ghost_demon( *mon.ghost ));
+ else
+ ghost.reset(NULL);
}
coord_def monsters::pos() const
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 68fa56440e..6dae67aca2 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1600,6 +1600,7 @@ static void unmarshall_monster(tagHeader &th, monsters &m)
m.target_y = unmarshallByte(th);
m.flags = unmarshallLong(th);
+ m.enchantments.clear();
const int nenchs = unmarshallShort(th);
for (int i = 0; i < nenchs; ++i)
m.enchantments.insert( unmarshall_mon_enchant(th) );