Fix in case of malloc failure.

svn path=/trunk/netsurf/; revision=12067
This commit is contained in:
Michael Drake 2011-03-15 21:31:44 +00:00
parent 89ee13de70
commit b69816ff79

View File

@ -288,6 +288,9 @@ char* gui_find_resource(const char *filename)
SLEN("file:///NetSurf:/Resources/") + 1;
char *resource_url = malloc(length);
if (resource_url == NULL)
return NULL;
resource_url = strcpy(resource_url, "file:///NetSurf:/Resources/");
return strcat(resource_url, filename);
}