diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-07 20:53:22 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-07 20:53:22 +0200 |
| commit | 96f19d706ae317b89744e6709781903c7b943371 (patch) | |
| tree | 2d1f62e9765f561221a212deac36467546d96740 /src/managers/input/Swipe.cpp | |
| parent | 3278db67a2328443b3f93c8559fc37fa6e8fc82f (diff) | |
fix possible swipe crash
Diffstat (limited to 'src/managers/input/Swipe.cpp')
| -rw-r--r-- | src/managers/input/Swipe.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index 692b7fda..98f31945 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -21,6 +21,9 @@ void CInputManager::onSwipeBegin(wlr_pointer_swipe_begin_event* e) { void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) { + if (!m_sActiveSwipe.pWorkspaceBegin) + return; // no valid swipe + static auto *const PSWIPEPERC = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_cancel_ratio")->floatValue; static auto *const PSWIPEDIST = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_distance")->intValue; static auto *const PSWIPEFORC = &g_pConfigManager->getConfigValuePtr("gestures:workspace_swipe_min_speed_to_force")->intValue; |
