From c86e7e4f3f54a738a7c35f12773b4ce167294ae0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 27 Sep 2017 07:40:28 -0400 Subject: TITANIC: Fix memory leak in CStarView --- engines/titanic/star_control/star_view.cpp | 5 +++++ engines/titanic/star_control/star_view.h | 1 + 2 files changed, 6 insertions(+) (limited to 'engines') 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 -- cgit v1.2.3