From 94dcaf339800921418aa00c17e298a1ae7793688 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 28 Sep 2011 12:20:16 +0100 Subject: [PATCH 02/10] If an error code is out of range for its domain, warn about it Signed-off-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40151 --- dbus/dbus-gobject.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 479a307..502dccf 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -1488,7 +1488,15 @@ gerror_domaincode_to_dbus_error_name (const DBusGObjectInfo *object_info, domain_str = info->default_iface; if (value) - code_str = value->value_nick; + { + code_str = value->value_nick; + } + else + { + g_warning ("Error code %d out of range for GError domain %s", + code, g_quark_to_string (domain)); + code_str = NULL; + } } } -- 1.7.6.3