diff options
author | t895 <clombardo169@gmail.com> | 2023-11-23 06:30:49 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2023-11-23 06:30:49 +0100 |
commit | 0b8218d8ebc07a17d94505068498014e9f61f6c9 (patch) | |
tree | 37f8a708f67317260044fd7b38b79ba6031f6cc9 /src | |
parent | frontend_common: Add option to read unsigned integers (diff) | |
download | yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar.gz yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar.bz2 yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar.lz yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar.xz yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.tar.zst yuzu-0b8218d8ebc07a17d94505068498014e9f61f6c9.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend_common/config.cpp | 10 |
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!"); } |