diff options
author | Neil Moore <neil@s-z.org> | 2012-09-09 19:52:42 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-09-09 20:30:00 -0400 |
commit | 76e38f8501f8291f9a299b4c3906b01768fc6541 (patch) | |
tree | bc29b718e1771045c48996031b1cafaf35eb1f04 /crawl-ref/source/fineff.cc | |
parent | a67535ab0e10667455f16a3beba570f9408a1253 (diff) | |
download | crawl-ref-76e38f8501f8291f9a299b4c3906b01768fc6541.tar.gz crawl-ref-76e38f8501f8291f9a299b4c3906b01768fc6541.zip |
Fix a memory leak when merging final_effects.
Diffstat (limited to 'crawl-ref/source/fineff.cc')
-rw-r--r-- | crawl-ref/source/fineff.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/fineff.cc b/crawl-ref/source/fineff.cc index 2aa5d89cb9..8adda78424 100644 --- a/crawl-ref/source/fineff.cc +++ b/crawl-ref/source/fineff.cc @@ -24,7 +24,10 @@ void final_effect::schedule() { if (mergeable(**fi)) { - (*fi)->merge(*this); + final_effect *fe = *fi; + merge(*fe); + *fi = this; + delete fe; return; } } |