aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-08-05 17:19:49 +0200
committervaxerski <[email protected]>2022-08-05 17:19:49 +0200
commitad423928564126f586ea689c151bdbe164ea101e (patch)
tree1e3b86fc07eb7373d6c06ebb778461c5c322fe22
parente0ada97a24adbe939db90c388b0d38161047f216 (diff)
downloadHyprland-ad423928564126f586ea689c151bdbe164ea101e.tar.gz
Hyprland-ad423928564126f586ea689c151bdbe164ea101e.zip
fix rare IME crash
-rw-r--r--src/managers/input/InputMethodRelay.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp
index c1800a2d..9fa3bf84 100644
--- a/src/managers/input/InputMethodRelay.cpp
+++ b/src/managers/input/InputMethodRelay.cpp
@@ -382,6 +382,9 @@ void CInputMethodRelay::removeTextInput(wlr_text_input_v3* pInput) {
}
void CInputMethodRelay::commitIMEState(wlr_text_input_v3* pInput) {
+ if (!m_pWLRIME)
+ return;
+
if (pInput->active_features & WLR_TEXT_INPUT_V3_FEATURE_SURROUNDING_TEXT)
wlr_input_method_v2_send_surrounding_text(m_pWLRIME, pInput->current.surrounding.text, pInput->current.surrounding.cursor, pInput->current.surrounding.anchor);