Check that we have a valid path when emitting a signal
authorMike Gorse <mgorse@novell.com>
Fri, 10 Feb 2012 12:11:37 +0000 (06:11 -0600)
committerMike Gorse <mgorse@novell.com>
Fri, 10 Feb 2012 12:11:37 +0000 (06:11 -0600)
If we don't have a valid object path in emit_event (ie, if NULL is
passed in, for some strange reason), then return rather than crashing in
libdbus.

https://bugzilla.gnome.org/show_bug.cgi?id=669794

atk-adaptor/event.c

index 6cf19fa..22f817d 100644 (file)
@@ -471,6 +471,7 @@ emit_event (AtkObject  *obj,
     return;
 
   path =  spi_register_object_to_path (spi_global_register, G_OBJECT (obj));
     return;
 
   path =  spi_register_object_to_path (spi_global_register, G_OBJECT (obj));
+  g_return_if_fail (path != NULL);
 
   /*
    * This is very annoying, but as '-' isn't a legal signal
 
   /*
    * This is very annoying, but as '-' isn't a legal signal