diff options
author | rcaridade145 <[email protected]> | 2020-02-22 11:59:45 +0000 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-03-09 13:34:15 +0100 |
commit | f77dbd234236322d99ae4df6bf07d06db7709d3a (patch) | |
tree | 70b049c085787a31106ced525b8ab8d0f6916506 /src | |
parent | 556c4ffd0051da4191bff37be9dc94d94f365af9 (diff) | |
download | marco-f77dbd234236322d99ae4df6bf07d06db7709d3a.tar.bz2 marco-f77dbd234236322d99ae4df6bf07d06db7709d3a.tar.xz |
Introduce nullpointer checks and return null if validation fails
Diffstat (limited to 'src')
-rw-r--r-- | src/core/frame.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/frame.c b/src/core/frame.c index f6e884a5..7ad74e5e 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -408,10 +408,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 |