[gnome-flashback/gnome-3-24] input-settings: monitor manager might not be available
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/gnome-3-24] input-settings: monitor manager might not be available
- Date: Fri, 21 Jul 2017 16:02:04 +0000 (UTC)
commit 7d88af7379fecc6edc953b61272e3ec532a1390d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Jul 21 18:54:26 2017 +0300
input-settings: monitor manager might not be available
Check if monitor manager is available before using it otherwise
we will get segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=785227
.../libinput-settings/gf-input-settings.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-settings/gf-input-settings.c
b/gnome-flashback/libinput-settings/gf-input-settings.c
index abe7eaa..c944a3d 100644
--- a/gnome-flashback/libinput-settings/gf-input-settings.c
+++ b/gnome-flashback/libinput-settings/gf-input-settings.c
@@ -1043,6 +1043,9 @@ find_output (GfInputSettings *settings,
if (!*edid[0] && !*edid[1] && !*edid[2])
return NULL;
+ if (!settings->monitor_manager)
+ return NULL;
+
outputs = flashback_monitor_manager_get_outputs (settings->monitor_manager,
&n_outputs);
@@ -1367,4 +1370,6 @@ gf_input_settings_set_display_config (GfInputSettings *settings,
settings->monitors_changed_id =
g_signal_connect (settings->monitor_manager, "monitors-changed",
G_CALLBACK (monitors_changed_cb), settings);
+
+ monitors_changed_cb (monitor_manager, settings);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]