Skip to content

Commit

Permalink
Guard against null changes introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaridade145 authored and raveit65 committed Mar 8, 2020
1 parent c0a6175 commit 1748fcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/compositor/compositor-xrender.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ shadow_picture_clip (Display *xdisplay,

visible_region = meta_window_get_frame_bounds (cw->window);

if (!visible_region)
if (visible_region == NULL)
return;

shadow_dx = -1 * (int) shadow_offsets_x [cw->shadow_type] - borders.invisible.left;
Expand Down Expand Up @@ -1153,9 +1153,13 @@ border_size (MetaCompWindow *cw)
{
visible_region = meta_window_get_frame_bounds (cw->window);

if (visible_region)
if (visible_region != NULL) {
visible = cairo_region_to_xserver_region (xdisplay, visible_region);
}
else {
g_warning ("Visible region is null");
}
}

meta_error_trap_push (display);
border = XFixesCreateRegionFromWindow (xdisplay, cw->id,
Expand Down

0 comments on commit 1748fcb

Please sign in to comment.