* src/utils.ci (file_exists_p): Fix stat(NULL,...)

This commit is contained in:
Tim Rühsen 2018-05-09 12:37:03 +02:00
parent 35f5f79ce1
commit 4bdb09d3a7

View File

@ -563,6 +563,9 @@ file_exists_p (const char *filename, file_stats_t *fstats)
{ {
struct stat buf; struct stat buf;
if (!filename)
return false;
#if defined(WINDOWS) || defined(__VMS) #if defined(WINDOWS) || defined(__VMS)
int ret = stat (filename, &buf); int ret = stat (filename, &buf);
if (ret >= 0) if (ret >= 0)