From e094fcbc9fcf39fb2d71cd521e8076f4703fa100 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 5 Jan 2011 00:37:43 +0000 Subject: Ensure that string vector exists before freeing it svn path=/trunk/libcss/; revision=11210 --- src/stylesheet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/stylesheet.c') 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); -- cgit v1.2.3