Skip to content

Commit

Permalink
Introduce nullpointer checks and return null if validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaridade145 authored and raveit65 committed Mar 8, 2020
1 parent ff9ed6d commit c0a6175
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,13 @@ meta_frame_sync_to_window (MetaFrame *frame,
cairo_region_t *
meta_frame_get_frame_bounds (MetaFrame *frame)
{
return meta_ui_get_frame_bounds (frame->window->screen->ui,
frame->xwindow,
frame->rect.width,
frame->rect.height);
if(frame->xwindow && frame->window !=NULL && frame->window->screen !=NULL && frame->window->screen->ui !=NULL) {
return meta_ui_get_frame_bounds (frame->window->screen->ui,
frame->xwindow,
frame->rect.width,
frame->rect.height);
}
return NULL;
}

void
Expand Down

0 comments on commit c0a6175

Please sign in to comment.