diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2021-03-15 16:18:40 +0200 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2021-03-15 16:18:40 +0200 |
commit | 103d6b281227959ba6bf041e6df47f7282d8e9b4 (patch) | |
tree | c0c9f63c587d046a16f439e233ebd9e721d84748 | |
parent | 7e69ac4d939b59f3fc32a63620a558fd59dd48ed (diff) | |
download | metacity-103d6b281227959ba6bf041e6df47f7282d8e9b4.tar.gz |
display: add NULL check to fix coverity defect
Coverity is right that window might be null but does not know that
grab_op is not moving operation.
Coverity CID: #1445663
-rw-r--r-- | src/core/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/display.c b/src/core/display.c index 75db10a8..ff909a62 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -3578,7 +3578,7 @@ meta_display_begin_grab_op (MetaDisplay *display, /* If we're trying to move a window, move the first * non-attached dialog instead. */ - if (meta_grab_op_is_moving (op)) + if (window != NULL && meta_grab_op_is_moving (op)) grab_window = get_first_freefloating_window (window); /* FIXME: |