This is an automated email from the git hooks/post-receive script.

bluesabre pushed a 
commit to branch 
master
in repository xfce/xfce4-settings.

commit 5bc82c2acb23ea72722fa5ec520b716ed93788ce
Author: Simon Steinbeiss <simon.steinbe...@elfenbeinturm.at>
Date:   Mon Mar 12 22:53:03 2018 +0100

    display: Fix race condition on monitor dis/connecting
    
    Signed-off-by: Sean Davis <smd.seanda...@gmail.com>
---
 dialogs/display-settings/main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 22ba412..6c20959 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -2422,7 +2422,8 @@ paint_output (cairo_t *cr, int i, double *snap_x, double 
*snap_y)
     double x, y, end_x, end_y;
     gint total_w, total_h;
     GList *connected_outputs = list_connected_outputs (&total_w, &total_h);
-    XfceOutputInfo *output = g_list_nth (connected_outputs, i)->data;
+    XfceOutputInfo *output = NULL;
+    GList *entry = NULL;
     PangoLayout *layout;
     PangoRectangle ink_extent, log_extent;
     GdkRectangle viewport;
@@ -2439,7 +2440,13 @@ paint_output (cairo_t *cr, int i, double *snap_x, double 
*snap_y)
 
     foo_scroll_area_get_viewport (FOO_SCROLL_AREA (randr_gui_area), &viewport);
 
-    get_geometry (output, &w, &h);
+    entry = g_list_nth (connected_outputs, i);
+    if (entry)
+        output = entry->data;
+    if (output)
+        get_geometry (output, &w, &h);
+    else
+        return;
 
     viewport.height -= 2 * MARGIN;
     viewport.width -= 2 * MARGIN;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to