forked from mirror/OpenTTD
(svn r25546) -Fix: two small memory leaks
This commit is contained in:
@@ -76,6 +76,7 @@ ScriptScanner::~ScriptScanner()
|
||||
this->Reset();
|
||||
|
||||
free(this->main_script);
|
||||
free(this->tar_file);
|
||||
delete this->engine;
|
||||
}
|
||||
|
||||
|
@@ -165,6 +165,9 @@ static Point MapXYZToViewport(const ViewPort *vp, int x, int y, int z)
|
||||
|
||||
void DeleteWindowViewport(Window *w)
|
||||
{
|
||||
if (w->viewport == NULL) return;
|
||||
|
||||
delete w->viewport->overlay;
|
||||
free(w->viewport);
|
||||
w->viewport = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user