diff options
author | Paul Gilbert | 2017-09-27 07:40:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-27 07:40:28 -0400 |
commit | c86e7e4f3f54a738a7c35f12773b4ce167294ae0 (patch) | |
tree | eec716ed85494510273cd0516fc8be374d79ac04 | |
parent | a6cba7b6ba67c86132e740505bc47c3606c27157 (diff) | |
download | scummvm-rg350-c86e7e4f3f54a738a7c35f12773b4ce167294ae0.tar.gz scummvm-rg350-c86e7e4f3f54a738a7c35f12773b4ce167294ae0.tar.bz2 scummvm-rg350-c86e7e4f3f54a738a7c35f12773b4ce167294ae0.zip |
TITANIC: Fix memory leak in CStarView
-rw-r--r-- | engines/titanic/star_control/star_view.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/star_control/star_view.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp index e65c5dab61..f66512e896 100644 --- a/engines/titanic/star_control/star_view.cpp +++ b/engines/titanic/star_control/star_view.cpp @@ -43,6 +43,11 @@ CStarView::CStarView() : _camera((const CNavigationInfo *)nullptr), _owner(nullp _camera.proc3(&data); } +CStarView::~CStarView() { + delete _videoSurface; + delete _photoSurface; +} + void CStarView::load(SimpleFile *file, int param) { if (!param) { _camera.load(file, param); diff --git a/engines/titanic/star_control/star_view.h b/engines/titanic/star_control/star_view.h index 4cd6e2bef5..553195b0c7 100644 --- a/engines/titanic/star_control/star_view.h +++ b/engines/titanic/star_control/star_view.h @@ -71,6 +71,7 @@ private: CVideoSurface **surface); public: CStarView(); + ~CStarView(); /** * Load the data for the class from file |