diff options
author | 2019-08-07 16:02:07 +0200 | |
---|---|---|
committer | 2019-08-12 09:42:11 +0900 | |
commit | 9be76e6b1272120dd5f9ae7aab400bf0479328ca (patch) | |
tree | a85faad7cb5c7f9d7c168d97e2cdc3f06de47a57 /sway/input/seatop_default.c | |
parent | ipc-client: remove useless free for failed malloc (diff) | |
download | sway-9be76e6b1272120dd5f9ae7aab400bf0479328ca.tar.gz sway-9be76e6b1272120dd5f9ae7aab400bf0479328ca.tar.zst sway-9be76e6b1272120dd5f9ae7aab400bf0479328ca.zip |
input: check pointer against nullptr
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r-- | sway/input/seatop_default.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 88138471..e3726dd1 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c | |||
@@ -241,7 +241,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
241 | bool is_floating_or_child = cont && container_is_floating_or_child(cont); | 241 | bool is_floating_or_child = cont && container_is_floating_or_child(cont); |
242 | bool is_fullscreen_or_child = cont && container_is_fullscreen_or_child(cont); | 242 | bool is_fullscreen_or_child = cont && container_is_fullscreen_or_child(cont); |
243 | enum wlr_edges edge = cont ? find_edge(cont, cursor) : WLR_EDGE_NONE; | 243 | enum wlr_edges edge = cont ? find_edge(cont, cursor) : WLR_EDGE_NONE; |
244 | enum wlr_edges resize_edge = edge ? | 244 | enum wlr_edges resize_edge = cont && edge ? |
245 | find_resize_edge(cont, cursor) : WLR_EDGE_NONE; | 245 | find_resize_edge(cont, cursor) : WLR_EDGE_NONE; |
246 | bool on_border = edge != WLR_EDGE_NONE; | 246 | bool on_border = edge != WLR_EDGE_NONE; |
247 | bool on_contents = cont && !on_border && surface; | 247 | bool on_contents = cont && !on_border && surface; |