[gnome-flashback] 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] input-settings: monitor manager might not be available
- Date: Fri, 21 Jul 2017 16:00:28 +0000 (UTC)
commit c45734eeee305651d553633ad7be12b747bf5c68
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 d1123e2..4eb90e2 100644
--- a/gnome-flashback/libinput-settings/gf-input-settings.c
+++ b/gnome-flashback/libinput-settings/gf-input-settings.c
@@ -1038,6 +1038,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);
@@ -1362,4 +1365,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]