diff --git a/WINGs/wapplication.c b/WINGs/wapplication.c index 620e378b..df1a52fa 100644 --- a/WINGs/wapplication.c +++ b/WINGs/wapplication.c @@ -66,6 +66,9 @@ static char *checkFile(char *path, char *folder, char *ext, char *resource) char *ret; int extralen; + if (!path || !resource) + return NULL; + extralen = (ext ? strlen(ext) : 0) + (folder ? strlen(folder) : 0) + 4; ret = wmalloc(strlen(path) + strlen(resource) + extralen + 8); strcpy(ret, path);