summaryrefslogtreecommitdiffstats
path: root/src/frontend_common/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend_common/config.cpp')
-rw-r--r--src/frontend_common/config.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp
index a68a9cb4b..eae4fdc8e 100644
--- a/src/frontend_common/config.cpp
+++ b/src/frontend_common/config.cpp
@@ -65,6 +65,11 @@ void Config::WriteToIni() const {
fp = fopen(config_loc.c_str(), "wb");
#endif
+ if (fp == nullptr) {
+ LOG_ERROR(Frontend, "Config file could not be saved!");
+ return;
+ }
+
CSimpleIniA::FileWriter writer(fp);
const SI_Error rc = config->Save(writer, false);
if (rc < 0) {
@@ -91,6 +96,11 @@ void Config::SetUpIni() {
}
#endif
+ if (fp == nullptr) {
+ LOG_ERROR(Frontend, "Config file could not be loaded!");
+ return;
+ }
+
if (SI_Error rc = config->LoadFile(fp); rc < 0) {
LOG_ERROR(Frontend, "Config file could not be loaded!");
}