mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-28 16:13:53 +03:00
std: Handle NULL pointer argument in c_dir() correctly.
This commit is contained in:
parent
e5089943ba
commit
5f9913570a
1 changed files with 4 additions and 2 deletions
|
@ -178,8 +178,10 @@ int c_isdir(const char *path) {
|
|||
mbchar_t *wpath = c_utf8_to_locale(path);
|
||||
int re = 0;
|
||||
|
||||
if (_tstat (wpath, &sb) == 0 && S_ISDIR(sb.st_mode)) {
|
||||
re = 1;
|
||||
if (path != NULL) {
|
||||
if (_tstat (wpath, &sb) == 0 && S_ISDIR(sb.st_mode)) {
|
||||
re = 1;
|
||||
}
|
||||
}
|
||||
c_free_locale_string(wpath);
|
||||
return re;
|
||||
|
|
Loading…
Reference in a new issue