summaryrefslogtreecommitdiff
path: root/src/stylesheet.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-01-05 00:37:43 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-01-05 00:37:43 +0000
commite094fcbc9fcf39fb2d71cd521e8076f4703fa100 (patch)
tree447d6ed788d5ffae8b6ea30738cb4c46f7a1b720 /src/stylesheet.c
parentf3cf0f579347a16120df8fc1c1ec3cd1f4e6d44e (diff)
downloadlibcss-e094fcbc9fcf39fb2d71cd521e8076f4703fa100.tar.gz
libcss-e094fcbc9fcf39fb2d71cd521e8076f4703fa100.tar.bz2
Ensure that string vector exists before freeing it
svn path=/trunk/libcss/; revision=11210
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r--src/stylesheet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index 406288e..ac226ee 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -286,7 +286,9 @@ css_error css_stylesheet_destroy(css_stylesheet *sheet)
string_index++) {
lwc_string_unref(sheet->string_vector[string_index]);
}
- sheet->alloc(sheet->string_vector, 0, sheet->pw);
+
+ if (sheet->string_vector != NULL)
+ sheet->alloc(sheet->string_vector, 0, sheet->pw);
sheet->alloc(sheet, 0, sheet->pw);