display: Fix a crash when opening the panel with the lid closed

The configuration manager might not be ready yet when we're called
from the lid state monitor handler. Don't do anything in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=786080
This commit is contained in:
Rui Matos 2017-08-22 19:23:46 +02:00
parent ef0cbf45f3
commit e5a1afee9c

View file

@ -2179,6 +2179,9 @@ on_screen_changed (CcDisplayPanel *panel)
GList *outputs, *l;
GtkWidget *main_widget;
if (!priv->manager)
return;
reset_titlebar (panel);
main_widget = gtk_stack_get_child_by_name (GTK_STACK (priv->stack), "main");