summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrcaridade145 <[email protected]>2020-02-22 11:59:45 +0000
committerraveit65 <[email protected]>2020-03-08 22:44:35 +0100
commit280e5dba5e26f7c8cc4feba376ed398728dbef8c (patch)
tree3988a2d98d2f4b31dd065225d6257f1f080fcef7
parent159addcc16f7ec39dd20c6ee6c756ed224b4f461 (diff)
downloadmarco-280e5dba5e26f7c8cc4feba376ed398728dbef8c.tar.bz2
marco-280e5dba5e26f7c8cc4feba376ed398728dbef8c.tar.xz
Introduce nullpointer checks and return null if validation fails
-rw-r--r--src/core/frame.c11
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