fix: Null and MemFile providers dumping `null` into recent files

This commit is contained in:
WerWolv 2022-10-22 09:08:18 +02:00
parent b5f7be2384
commit 04a4957ccf
1 changed files with 2 additions and 1 deletions

View File

@ -504,7 +504,8 @@ namespace hex::plugin::builtin {
auto fileName = hex::format("{:%y%m%d_%H%M%S}.json", fmt::gmtime(std::chrono::system_clock::now()));
fs::File recentFile(recentPath / fileName, fs::File::Mode::Create);
recentFile.write(provider->storeSettings().dump(4));
if (auto settings = provider->storeSettings(); !settings.is_null())
recentFile.write(settings.dump(4));
}
updateRecentProviders();