diff options
author | Borja Lorente | 2016-08-25 13:03:46 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-25 13:26:02 +0200 |
commit | 9444a1864b8a12b1f0c0495e7a948db250870137 (patch) | |
tree | feaa55e3a2d0991599d4307353d2d49015127f80 /graphics/macgui/macwindow.cpp | |
parent | 2b6f1719e72d0140b74270e04d6a106e6adc5b30 (diff) | |
download | scummvm-rg350-9444a1864b8a12b1f0c0495e7a948db250870137.tar.gz scummvm-rg350-9444a1864b8a12b1f0c0495e7a948db250870137.tar.bz2 scummvm-rg350-9444a1864b8a12b1f0c0495e7a948db250870137.zip |
GRAPHICS: Fix leak in macgui border loading
Diffstat (limited to 'graphics/macgui/macwindow.cpp')
-rw-r--r-- | graphics/macgui/macwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp index dbb600ba82..6405d37591 100644 --- a/graphics/macgui/macwindow.cpp +++ b/graphics/macgui/macwindow.cpp @@ -324,19 +324,19 @@ void MacWindow::loadBorder(Common::SeekableReadStream &file, bool active, int lo source = *(bmpDecoder.getSurface()); source.convertToInPlace(surface->getSupportedPixelFormat(), bmpDecoder.getPalette()); - surface->create(source.w, source.h, source.format); surface->copyFrom(source); surface->applyColorKey(255, 0, 255, false); if (active) - _macBorder.addActiveBorder(*surface); + _macBorder.addActiveBorder(surface); else - _macBorder.addInactiveBorder(*surface); + _macBorder.addInactiveBorder(surface); if (!_macBorder.hasOffsets()) _macBorder.setOffsets(lo, ro, to, bo); updateInnerDims(); + source.free(); } void MacWindow::setCloseable(bool closeable) { |