diff --git a/src/PanelWindow.vala b/src/PanelWindow.vala index cd6669fb..5aaf5b65 100644 --- a/src/PanelWindow.vala +++ b/src/PanelWindow.vala @@ -131,7 +131,9 @@ public class Wingpanel.PanelWindow : Gtk.Window { this.expanded = true; this.set_size_request (monitor_width, monitor_height); - desktop_panel.focus (); + if (desktop_panel != null) { + desktop_panel.focus (); + } } else if (!expand) { Services.BackgroundManager.get_default ().restore_window ();