diff options
author | rcaridade145 <[email protected]> | 2020-02-22 11:59:45 +0000 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-03-08 22:33:28 +0100 |
commit | c0a61756c01f5d8fa1e58fe97d0cb3a9d42c9871 (patch) | |
tree | 6a424f16f9918b840483f73b9166531b537ed4f5 /src | |
parent | ff9ed6d7239ec6b0e5d0eca8cbd5d63abec921e1 (diff) | |
download | marco-c0a61756c01f5d8fa1e58fe97d0cb3a9d42c9871.tar.bz2 marco-c0a61756c01f5d8fa1e58fe97d0cb3a9d42c9871.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 6c1c7b21..e28d669c 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -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 |