aboutsummaryrefslogtreecommitdiff
path: root/src/dbus-proto.c
diff options
context:
space:
mode:
authorVsevolod Buzinov <ext-vsevolod.buzinov@nokia.com>2010-10-06 11:39:28 +0300
committerVsevolod Buzinov <ext-vsevolod.buzinov@nokia.com>2010-10-14 14:03:18 +0300
commite19026eafd653fde0250cffd9ba61db439757655 (patch)
tree3c02c273ae1a6280cb7024d01f5277ef32d993c1 /src/dbus-proto.c
parentee2a0e690550849839f4452acb024d2fc2accd40 (diff)
Coverity-based fixes
Reverted the break in input_cb
Diffstat (limited to 'src/dbus-proto.c')
-rw-r--r--src/dbus-proto.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dbus-proto.c b/src/dbus-proto.c
index 6aa26db..958f19d 100644
--- a/src/dbus-proto.c
+++ b/src/dbus-proto.c
@@ -276,10 +276,12 @@ static void status_method(DBusPendingCall *pend, void *data)
if (dbus_message_get_type(dbusmsg) == DBUS_MESSAGE_TYPE_ERROR) {
errmsg = dbus_message_get_error_name(dbusmsg);
- if (!strncmp(errmsg, "org.freedesktop.", 16))
- errmsg += 16;
- else if (!strncmp(errmsg, "com.nokia.", 10))
- errmsg += 10;
+ if (errmsg != NULL) {
+ if (!strncmp(errmsg, "org.freedesktop.", 16))
+ errmsg += 16;
+ else if (!strncmp(errmsg, "com.nokia.", 10))
+ errmsg += 10;
+ }
memset(&resmsg, 0, sizeof(resmsg));
resmsg.status.type = RESMSG_STATUS;