mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
Achievements: Fix crash starting with no game
This commit is contained in:
parent
15a81e5543
commit
21560537c2
@ -1207,7 +1207,7 @@ void Achievements::GameChanged(CDImage* image)
|
|||||||
|
|
||||||
bool Achievements::IdentifyGame(CDImage* image)
|
bool Achievements::IdentifyGame(CDImage* image)
|
||||||
{
|
{
|
||||||
if (s_state.game_path == image->GetPath())
|
if (s_state.game_path == (image ? std::string_view(image->GetPath()) : std::string_view()))
|
||||||
{
|
{
|
||||||
WARNING_LOG("Game path is unchanged.");
|
WARNING_LOG("Game path is unchanged.");
|
||||||
return false;
|
return false;
|
||||||
@ -1238,7 +1238,6 @@ bool Achievements::IdentifyGame(CDImage* image)
|
|||||||
{
|
{
|
||||||
// only the path has changed - different format/save state/etc.
|
// only the path has changed - different format/save state/etc.
|
||||||
INFO_LOG("Detected path change to '{}'", s_state.game_path);
|
INFO_LOG("Detected path change to '{}'", s_state.game_path);
|
||||||
s_state.game_path = image->GetPath();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user