diff options
author | Thomas Wood <thomas.wood@intel.com> | 2013-08-02 13:27:09 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2013-08-02 16:35:26 +0100 |
commit | eca503bcc5a4a8ee8662c68d1f4c0daec9924c72 (patch) | |
tree | 669e0bcf299320e5cd8549c6a9528ae10f6dc7c1 | |
parent | 2f1d233a6426d38408e1347ad582a0cd98b7d670 (diff) | |
download | gnome-control-center-eca503bcc5a4a8ee8662c68d1f4c0daec9924c72.tar.gz |
shell: prevent a warning if the monitor number is not available yet
https://bugzilla.gnome.org/show_bug.cgi?id=705297
-rw-r--r-- | shell/cc-window.c | 3 |
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)); |