test-stkutil: Handle NULL strings

g_str_equal does not handle NULL strings
This commit is contained in:
Denis Kenzior 2010-05-13 13:43:41 -05:00
parent 1ddc7ebf19
commit fd6c902572
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ static void check_item(const struct stk_item *command,
const struct stk_item *test)
{
g_assert(command->id == test->id);
g_assert(g_str_equal(command->text, test->text));
if (command->text == NULL)
g_assert(test->text == NULL);
else
g_assert(g_str_equal(command->text, test->text));
}
/* Defined in TS 102.223 Section 8.10 */