summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-18 10:39:37 -0500
committerLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-18 10:39:37 -0500
commit23b90d8e69d203697c5548fdd140bf3052749dfa (patch)
tree9305fd6a20d457c7cc7cb0ee7cbd59a801d92b8d
parentRevert "enhanced whitespace remover" (diff)
downloadsway-23b90d8e69d203697c5548fdd140bf3052749dfa.tar.gz
sway-23b90d8e69d203697c5548fdd140bf3052749dfa.tar.zst
sway-23b90d8e69d203697c5548fdd140bf3052749dfa.zip
Fixed mouse clicks from triggering a segfault
-rw-r--r--sway/handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index cd97ab43..4980f65c 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -322,7 +322,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
322 int i = 0; 322 int i = 0;
323 // Do checks to determine if proper keys are being held 323 // Do checks to determine if proper keys are being held
324 swayc_t *view = active_workspace->focused; 324 swayc_t *view = active_workspace->focused;
325 if (m1_held) { 325 if (m1_held && view) {
326 if (view->is_floating) { 326 if (view->is_floating) {
327 while (keys_pressed[i++]) { 327 while (keys_pressed[i++]) {
328 if (keys_pressed[i] == config->floating_mod) { 328 if (keys_pressed[i] == config->floating_mod) {
@@ -338,7 +338,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
338 } 338 }
339 } 339 }
340 } 340 }
341 } else if (m2_held) { 341 } else if (m2_held && view) {
342 if (view->is_floating) { 342 if (view->is_floating) {
343 while (keys_pressed[i++]) { 343 while (keys_pressed[i++]) {
344 if (keys_pressed[i] == config->floating_mod) { 344 if (keys_pressed[i] == config->floating_mod) {