Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
check return status when checking for old prboom_dir (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
facespkz authored Feb 14, 2022
1 parent e848110 commit 1e2e570
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions prboom2/src/SDL/i_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ const char *I_DoomExeDir(void)

// if ~/.$prboom_dir doesn't exist,
// create and use directory in XDG_DATA_HOME
stat(base, &data_dir);
if (!S_ISDIR(data_dir.st_mode))
if (stat(base, &data_dir) || !S_ISDIR(data_dir.st_mode))
{
// SDL creates this directory if it doesn't exist
char *prefpath = SDL_GetPrefPath("", prboom_dir);
Expand Down

0 comments on commit 1e2e570

Please sign in to comment.