summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-04-04 15:44:28 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-17 18:54:20 +0100
commitcd7e9a1c6dd0eef6e867cac80339a38758d0cd6f (patch)
tree200ef4cff90707b9cfcd067ce76f5ff2cfd45aa2
parentc239a810543bde85dd458012612874cdc81a4151 (diff)
gerror_to_dbus_error_message: guarantee to return non-NULL
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767 Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
-rw-r--r--dbus/dbus-gobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c
index 0494c8a..fc6e247 100644
--- a/dbus/dbus-gobject.c
+++ b/dbus/dbus-gobject.c
@@ -1524,6 +1524,12 @@ gerror_to_dbus_error_message (const DBusGObjectInfo *object_info,
g_free (error_name);
}
}
+
+ /* this can only fail through a programming error in dbus-glib
+ * (@message is bad), or OOM */
+ if (reply == NULL)
+ g_error ("dbus_message_new_error failed: out of memory?");
+
return reply;
}