[gnome-settings-daemon] common: Fix possible crash in GsdDeviceMapper



commit 311849e8c96f3cf1f20d234d2db073feb49b4a1b
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 25 11:53:16 2014 +0200

    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

 plugins/common/gsd-device-mapper.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/common/gsd-device-mapper.c b/plugins/common/gsd-device-mapper.c
index 3b1cab4..844e293 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]