summaryrefslogtreecommitdiffstats
path: root/input/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'input/device.c')
-rw-r--r--input/device.c4
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;