From a49b77cd799a081d04a14f8eeaf8e61b678507bf Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 11 Aug 2013 16:38:10 -0500 Subject: ZVISION: Fix memory leak --- engines/zvision/render_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision') 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); -- cgit v1.2.3