aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/main.cpp2
-rw-r--r--graphics/font.cpp1
-rw-r--r--graphics/scaler.cpp2
-rw-r--r--gui/newgui.cpp4
-rw-r--r--gui/newgui.h1
5 files changed, 9 insertions, 1 deletions
diff --git a/base/main.cpp b/base/main.cpp
index a3e1c0fe5d..a53595ffca 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -332,7 +332,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
PluginManager::instance().unloadPluginsExcept(NULL);
PluginManager::instance().destroy();
ConfMan.destroy();
- delete g_gui.theme();
+ g_gui.destroy();
return 0;
}
diff --git a/graphics/font.cpp b/graphics/font.cpp
index bec80e9ec0..b5817e613a 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -161,6 +161,7 @@ void free_font(NewFontData* pf) {
free(pf->bits);
free(pf->offset);
free(pf->width);
+ free(pf->bbx);
free(pf);
}
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index 428e8a4605..ec20a722e6 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -112,10 +112,12 @@ void InitScalers(uint32 BitFormat) {
}
void DestroyScalers(){
+#ifndef DISABLE_HQ_SCALERS
free(RGBtoYUV);
free(LUT16to32);
RGBtoYUV = 0;
LUT16to32 = 0;
+#endif
}
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 669d305ef1..5e034b726c 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -121,6 +121,10 @@ NewGui::NewGui() : _needRedraw(false),
_themeChange = false;
}
+NewGui::~NewGui() {
+ delete _theme;
+}
+
bool NewGui::loadNewTheme(const Common::String &style) {
Common::String styleType;
Common::ConfigFile cfg;
diff --git a/gui/newgui.h b/gui/newgui.h
index bfbe77cdc0..4cf082c877 100644
--- a/gui/newgui.h
+++ b/gui/newgui.h
@@ -66,6 +66,7 @@ class NewGui : public Common::Singleton<NewGui> {
friend class Dialog;
friend class Common::Singleton<SingletonBaseType>;
NewGui();
+ ~NewGui();
public:
// Main entry for the GUI: this will start an event loop that keeps running