Fix null pointer dereferencing in SDL_GetPrefPath(3) (#163)

This commit is contained in:
Low-power 2022-11-17 15:10:24 +08:00 committed by GitHub
parent 3c6e1c9d47
commit 6486589c4a
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ int winmain::WinMain(LPCSTR lpCmdLine)
ImGuiIO& io = ImGui::GetIO();
ImIO = &io;
auto prefPath = SDL_GetPrefPath(nullptr, "SpaceCadetPinball");
auto prefPath = SDL_GetPrefPath("", "SpaceCadetPinball");
auto iniPath = std::string(prefPath) + "imgui_pb.ini";
io.IniFilename = iniPath.c_str();