diff options
author | richiesams | 2013-08-11 16:38:10 -0500 |
---|---|---|
committer | richiesams | 2013-08-11 16:38:10 -0500 |
commit | a49b77cd799a081d04a14f8eeaf8e61b678507bf (patch) | |
tree | b0973802629ddad4a2ca7f7b36dd56defa72eb3b | |
parent | 00a17a66d0e8317001829fe36639ef9201d15798 (diff) | |
download | scummvm-rg350-a49b77cd799a081d04a14f8eeaf8e61b678507bf.tar.gz scummvm-rg350-a49b77cd799a081d04a14f8eeaf8e61b678507bf.tar.bz2 scummvm-rg350-a49b77cd799a081d04a14f8eeaf8e61b678507bf.zip |
ZVISION: Fix memory leak
-rw-r--r-- | engines/zvision/render_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index 2d45ad835d..e705a7f8b4 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -166,6 +166,9 @@ void RenderManager::setBackgroundImage(const Common::String &fileName) { return; } + if (_currentBackground != 0) { + delete _currentBackground; + } _currentBackground = file; renderImageToScreen(*_currentBackground, 0, 0, Common::Rect(), true); |