From 81dfba16f3f16f3b02a1043966db57bfed73c204 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 18 Mar 2022 00:56:59 +0600 Subject: [PATCH] wl_mouse: Don't uncapture mouse if is already uncaptured --- src/qt/wl_mouse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/wl_mouse.cpp b/src/qt/wl_mouse.cpp index 420ddc486..75a03813c 100644 --- a/src/qt/wl_mouse.cpp +++ b/src/qt/wl_mouse.cpp @@ -98,8 +98,8 @@ void wl_mouse_capture(QWindow *window) void wl_mouse_uncapture() { - zwp_locked_pointer_v1_destroy(conf_pointer); - zwp_relative_pointer_v1_destroy(rel_pointer); + if (conf_pointer) zwp_locked_pointer_v1_destroy(conf_pointer); + if (rel_pointer) zwp_relative_pointer_v1_destroy(rel_pointer); rel_pointer = nullptr; conf_pointer = nullptr; }