From: Adam Dickmeiss Date: Mon, 8 Nov 2010 14:25:01 +0000 (+0100) Subject: Dont work with NULL chains X-Git-Tag: v4.1.4~14^2~12^2~3 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=08fcb37b8bac4d5573b6afec27c3f3df4119781f;p=yaz-moved-to-github.git Dont work with NULL chains --- diff --git a/test/test_icu.c b/test/test_icu.c index 2ad005c..8be8869 100644 --- a/test/test_icu.c +++ b/test/test_icu.c @@ -450,6 +450,8 @@ static void check_icu_chain(void) xmlFreeDoc(doc); YAZ_CHECK(chain); + if (!chain) + return; YAZ_CHECK(icu_chain_assign_cstr(chain, en_str, &status)); @@ -507,6 +509,8 @@ static void check_bug_1140(void) xmlFreeDoc(doc); YAZ_CHECK(chain); + if (!chain) + return; YAZ_CHECK(icu_chain_assign_cstr( chain, "O Romeo, Romeo! wherefore art thou\t Romeo?", @@ -773,6 +777,8 @@ static void check_icu_iter2(void) xmlFreeDoc(doc); YAZ_CHECK(chain); + if (!chain) + return; YAZ_CHECK(test_iter(chain, "Adobe Acrobat Reader, 1991-1999.", "[adobe][acrobat][reader][1991][][1999][]"));