diff options
author | David Turner | 2011-01-14 00:13:27 +0000 |
---|---|---|
committer | David Turner | 2011-01-14 00:13:27 +0000 |
commit | 28e7ea8c2217bceee9fd581cb78c9c198cf3c6fd (patch) | |
tree | 69d2d12c13a7ffa68a0a13befd95cf3517935f8c /engines/parallaction | |
parent | 00d78dd3d5ad8ac985018e5781d15e57138d38b8 (diff) | |
download | scummvm-rg350-28e7ea8c2217bceee9fd581cb78c9c198cf3c6fd.tar.gz scummvm-rg350-28e7ea8c2217bceee9fd581cb78c9c198cf3c6fd.tar.bz2 scummvm-rg350-28e7ea8c2217bceee9fd581cb78c9c198cf3c6fd.zip |
PARALLACTION: Fix Valgrind Error on Engine Exit.
The automatic destruction of engine member "_char" of type Character at end of the destructor causes an invalid read in the destruction of the AnimationPtr which is a SharedPtr. To stop this happening, the SharedPtr is reset() prior to the destruction of Gfx, so it's dependencies on Gfx are still present. This will affect Nippon Safes as well as Big Red Adventure, but is unlikely to cause any issues and it is likely this exists in NS as well.
Thanks to fuzzie for this code.
svn-id: r55233
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/parallaction.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 3e060a2eca..82557fd262 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -91,6 +91,7 @@ Parallaction::~Parallaction() { _balloonMan = 0; delete _localFlagNames; + _char._ani.reset(); delete _gfx; delete _soundMan; delete _disk; |