[at-spi2-core] Add a check for a NULL message



commit 44ae03841c24ad389b604a8d752caa081cb18c33
Author: Mike Gorse <mgorse novell com>
Date:   Sat Dec 4 05:25:22 2010 -0500

    Add a check for a NULL message

 atspi/atspi-misc.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 37bfdaa..38087a0 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -566,8 +566,12 @@ _atspi_dbus_return_accessible_from_message (DBusMessage *message)
 {
   DBusMessageIter iter;
   AtspiAccessible *retval = NULL;
-  const char *signature = dbus_message_get_signature (message);
-   
+  const char *signature;
+
+  if (!message)
+    return NULL;
+
+  signature = dbus_message_get_signature (message);
   if (!strcmp (signature, "(so)"))
   {
     dbus_message_iter_init (message, &iter);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]