summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbcameron <bcameron@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2004-01-27 21:33:26 +0000
committerbcameron <bcameron@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2004-01-27 21:33:26 +0000
commitabd26ae4a9d14c112bda60548de53b6fa707bbc7 (patch)
tree3e18a66a0ee833645720e59a865dd8c60074e99c /test
parentc37df77ae6ecbf0df35ddaf4452ec5c17bdd700f (diff)
downloadat-spi2-core-abd26ae4a9d14c112bda60548de53b6fa707bbc7.tar.gz
2004-01-27 Brian Cameron <brian.cameron@sun.com>
* 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
Diffstat (limited to 'test')
-rw-r--r--test/simple-at.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/simple-at.c b/test/simple-at.c
index 2e03c557..1283b8f8 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);