summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 5118b22da..0c500f2f5 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -1258,6 +1258,9 @@ get_monitor_height (CcWindow *self)
GdkScreen *screen;
GdkRectangle rect;
+ if (self->priv->monitor_num < 0)
+ return 0;
+
/* We cannot use workarea here, as this wouldn't
* be updated when we read it after a monitors-changed signal */
screen = gtk_widget_get_screen (GTK_WIDGET (self));