From abd26ae4a9d14c112bda60548de53b6fa707bbc7 Mon Sep 17 00:00:00 2001 From: bcameron Date: Tue, 27 Jan 2004 21:33:26 +0000 Subject: [PATCH] 2004-01-27 Brian Cameron * test/simple-at.c: Fixed null string problems that cause core dumping problems on Solaris. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@592 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 5 +++++ test/simple-at.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d8afb5..1471ced 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-27 Brian Cameron + + * test/simple-at.c: Fixed null string problems that cause core + dumping problems on Solaris. + 2004-01-12 Bill Haneman * configure.in: Incremented version to 1.3.11. diff --git a/test/simple-at.c b/test/simple-at.c index 2e03c55..1283b8f 100644 --- a/test/simple-at.c +++ b/test/simple-at.c @@ -127,7 +127,7 @@ main (int argc, char **argv) { application = Accessible_getChildAtIndex (desktop, j); s = Accessible_getName (application); - fprintf (stderr, "app %d name: %s\n", j, s); + fprintf (stderr, "app %d name: %s\n", j, s ? s : "(nil)"); #ifdef PRINT_TREE print_accessible_tree (application, "*"); #endif @@ -222,7 +222,9 @@ print_accessible_tree (Accessible *accessible, char *prefix) name = Accessible_getName (accessible); role_name = Accessible_getRoleName (accessible); fprintf (stdout, "%sAccessible [%s] \"%s\"; parent [%s] %s.\n", - prefix, role_name, name, parent_role, parent_name); + prefix, role_name, name ? name : "(nil)", + parent_role ? parent_role : "(nil)", + parent_name ? parent_name : "(nil)"); SPI_freeString (name); SPI_freeString (role_name); SPI_freeString (parent_name); -- 2.7.4