diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-01-05 00:37:43 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-01-05 00:37:43 +0000 |
commit | e094fcbc9fcf39fb2d71cd521e8076f4703fa100 (patch) | |
tree | 447d6ed788d5ffae8b6ea30738cb4c46f7a1b720 | |
parent | f3cf0f579347a16120df8fc1c1ec3cd1f4e6d44e (diff) | |
download | libcss-e094fcbc9fcf39fb2d71cd521e8076f4703fa100.tar.gz libcss-e094fcbc9fcf39fb2d71cd521e8076f4703fa100.tar.bz2 |
Ensure that string vector exists before freeing it
svn path=/trunk/libcss/; revision=11210
-rw-r--r-- | src/stylesheet.c | 4 |
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); |