summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-07-25 11:53:16 +0200
committerBastien Nocera <hadess@hadess.net>2014-10-28 13:51:01 +0100
commit311849e8c96f3cf1f20d234d2db073feb49b4a1b (patch)
tree4ce56df6244af841cf6871c79760c9148cc5c23b
parent4f30831e0176a775f00b7af86bd19c664a68bc5c (diff)
downloadgnome-settings-daemon-311849e8c96f3cf1f20d234d2db073feb49b4a1b.tar.gz
common: Fix possible crash in GsdDeviceMapper
If the input device isn't known to the device mapper (say a keyboard for example), we'd crash trying to check which output it was attached to. https://bugzilla.gnome.org/show_bug.cgi?id=720295
-rw-r--r--plugins/common/gsd-device-mapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
index 3b1cab4f..844e293f 100644
--- a/plugins/common/gsd-device-mapper.c
+++ b/plugins/common/gsd-device-mapper.c
@@ -500,6 +500,9 @@ input_info_set_output (GsdInputInfo *input,
static GsdOutputInfo *
input_info_get_output (GsdInputInfo *input)
{
+ if (!input)
+ return NULL;
+
if (input->output)
return input->output;