mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 01:15:39 +00:00
filesystem: Fixed memory leak on Windows.
This commit is contained in:
parent
e944f0fb9d
commit
4a296f1bde
1 changed files with 1 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ bool SDL_SYS_RemovePath(const char *path)
|
|||
|
||||
WIN32_FILE_ATTRIBUTE_DATA info;
|
||||
if (!GetFileAttributesExW(wpath, GetFileExInfoStandard, &info)) {
|
||||
SDL_free(wpath);
|
||||
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
|
||||
// Note that ERROR_PATH_NOT_FOUND means a parent dir is missing, and we consider that an error.
|
||||
return true; // thing is already gone, call it a success.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue