Commit c214eb15 authored by Jonas Ådahl's avatar Jonas Ådahl

monitor-manager: Check active monitors when looking for logical monitor

An inactive monitor will not be assigned to a logical monitor, so don't
try to match against those. This avoids a dereferencing a NULL when the
main output of an inactive monitor doesn't have an assigned CRTC.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
parent e6eac466
......@@ -2950,7 +2950,8 @@ meta_monitor_manager_get_monitor_for_connector (MetaMonitorManager *manager,
{
MetaMonitor *monitor = l->data;
if (g_str_equal (connector, meta_monitor_get_connector (monitor)))
if (meta_monitor_is_active (monitor) &&
g_str_equal (connector, meta_monitor_get_connector (monitor)))
{
MetaOutput *main_output = meta_monitor_get_main_output (monitor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment