diff options
author | Paul Gilbert | 2016-11-14 21:55:23 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-14 21:55:23 -0500 |
commit | f57287702e4cacc17b655bababf9167783e9e159 (patch) | |
tree | 902b4ccffbfd77c82b623536531bfd5d8f9e0c43 /engines/titanic/support/video_surface.cpp | |
parent | ccbe07bd815472f7d1ff76400d83206bb6c31261 (diff) | |
download | scummvm-rg350-f57287702e4cacc17b655bababf9167783e9e159.tar.gz scummvm-rg350-f57287702e4cacc17b655bababf9167783e9e159.tar.bz2 scummvm-rg350-f57287702e4cacc17b655bababf9167783e9e159.zip |
TITANIC: Fix freeing of video surfaces
Diffstat (limited to 'engines/titanic/support/video_surface.cpp')
-rw-r--r-- | engines/titanic/support/video_surface.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index fd570e5d9a..7455e8cfef 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -41,8 +41,6 @@ CVideoSurface::CVideoSurface(CScreenManager *screenManager) : } CVideoSurface::~CVideoSurface() { - if (_ddSurface) - _videoSurfaceCounter -= freeSurface(); --_videoSurfaceCounter; if (_freeTransparencySurface == DisposeAfterUse::YES) @@ -334,6 +332,11 @@ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, const CResourceKey } } +OSVideoSurface::~OSVideoSurface() { + if (_ddSurface) + _videoSurfaceCounter -= OSVideoSurface::freeSurface(); +} + void OSVideoSurface::loadResource(const CResourceKey &key) { _resourceKey = key; _pendingLoad = true; |