summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fontcache.cpp3
-rw-r--r--src/script/script_config.cpp5
-rw-r--r--src/window.cpp3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index ce15233b7..530dc7cf8 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -216,7 +216,8 @@ TrueTypeFontCache::TrueTypeFontCache(FontSize fs, int pixels) : FontCache(fs), r
*/
TrueTypeFontCache::~TrueTypeFontCache()
{
- this->ClearFontCache();
+ /* Virtual functions get called statically in destructors, so make it explicit to remove any confusion. */
+ this->TrueTypeFontCache::ClearFontCache();
for (auto &iter : this->font_tables) {
free(iter.second.second);
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp
index 9bb953c4c..eeab51bed 100644
--- a/src/script/script_config.cpp
+++ b/src/script/script_config.cpp
@@ -37,6 +37,7 @@ void ScriptConfig::Change(const char *name, int version, bool force_exact_match,
this->SetSetting(item.name, InteractiveRandomRange(item.max_value + 1 - item.min_value) + item.min_value);
}
}
+
this->AddRandomDeviation();
}
}
@@ -52,7 +53,9 @@ ScriptConfig::ScriptConfig(const ScriptConfig *config)
for (const auto &item : config->settings) {
this->settings[stredup(item.first)] = item.second;
}
- this->AddRandomDeviation();
+
+ /* Virtual functions get called statically in constructors, so make it explicit to remove any confusion. */
+ this->ScriptConfig::AddRandomDeviation();
}
ScriptConfig::~ScriptConfig()
diff --git a/src/window.cpp b/src/window.cpp
index af4721445..bb7787581 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1094,7 +1094,8 @@ Window::~Window()
/* Make sure we don't try to access this window as the focused window when it doesn't exist anymore. */
if (_focused_window == this) {
- this->OnFocusLost();
+ /* Virtual functions get called statically in destructors, so make it explicit to remove any confusion. */
+ this->Window::OnFocusLost();
_focused_window = nullptr;
}