diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-08-03 14:18:54 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-08-03 14:18:54 +0000 |
commit | 309dbb1060ee24785b06ceb49a75d42c69d02f8a (patch) | |
tree | 726b82ccf0d3774756ac8a2dce3c6f747fcf599c /input | |
parent | 2639da11e06cc2d91c7c3416068333587f2b5df1 (diff) |
input: GetName - fixed seg fault when the remote name is unknown
Diffstat (limited to 'input')
-rw-r--r-- | input/device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/input/device.c b/input/device.c index 4f983d99..6bf3da9a 100644 --- a/input/device.c +++ b/input/device.c @@ -952,8 +952,8 @@ static DBusHandlerResult device_get_name(DBusConnection *conn, { struct device *idev = data; DBusMessage *reply; - const char *pname = idev->name; - + const char *pname = (idev->name ? idev->name : ""); + reply = dbus_message_new_method_return(msg); if (!reply) return DBUS_HANDLER_RESULT_NEED_MEMORY; |