Prevent assertion when imported stylesheet fails to load.

svn path=/trunk/netsurf/; revision=10256
This commit is contained in:
John Mark Bell 2010-04-06 19:31:23 +00:00
parent eae4845015
commit 1c6d8c7e47

View File

@ -179,11 +179,13 @@ bool nscss_convert(struct content *c)
/* Add on the size of the imported sheets */
for (i = 0; i < c->data.css.import_count; i++) {
struct content *import = hlcache_handle_get_content(
c->data.css.imports[i].c);
if (c->data.css.imports[i].c != NULL) {
struct content *import = hlcache_handle_get_content(
c->data.css.imports[i].c);
if (import != NULL) {
c->size += import->size;
if (import != NULL) {
c->size += import->size;
}
}
}