]> git.tdb.fi Git - geometrycompositor.git/commitdiff
Don't try to create a mask out of null rects
authorMikko Rasa <tdb@tdb.fi>
Fri, 18 Dec 2015 09:24:27 +0000 (11:24 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 18 Dec 2015 09:24:27 +0000 (11:24 +0200)
This may happen if the window is destroyed at just the right moment.

source/main.c

index f7688b9eb920414f4695d9014b000640bf940289..cd2f1acb5a085bec2e8d33d30fbd49844382e7cd 100644 (file)
@@ -422,6 +422,8 @@ void update_window_mask(Compositor *compositor, CompositedWindow *window)
                return;
 
        rects = XShapeGetRectangles(compositor->display, window->window, ShapeBounding, &rect_count, &rect_order);
+       if(!rects)
+               return;
 
        width = window->width+2*window->border;
        height = window->height+2*window->border;