summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/script/script_scanner.cpp1
-rw-r--r--src/viewport.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp
index 248b17f9a..2197a5505 100644
--- a/src/script/script_scanner.cpp
+++ b/src/script/script_scanner.cpp
@@ -76,6 +76,7 @@ ScriptScanner::~ScriptScanner()
this->Reset();
free(this->main_script);
+ free(this->tar_file);
delete this->engine;
}
diff --git a/src/viewport.cpp b/src/viewport.cpp
index d96d283db..da0474093 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -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;
}