From e57153b0821acd876f1938a192f21843c3f70679 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 17 Oct 2014 10:59:44 +0200 Subject: iOS: ensure we have a valid focusObject before sending it IM events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should not really happen, but since we don't store the focus object given to us, we should do a check. A crash was seen from this when running the "Application" example for widgets. Change-Id: I9c4121766d7028a4eceede7d7b15c8c53d34e16e Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosinputcontext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index 13e91889a2..ac6e339633 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -322,7 +322,7 @@ bool QIOSInputContext::isInputPanelVisible() const void QIOSInputContext::cursorRectangleChanged() { - if (!m_keyboardListener->m_keyboardVisibleAndDocked) + if (!m_keyboardListener->m_keyboardVisibleAndDocked || !qApp->focusObject()) return; // Check if the cursor has changed position inside the input item. Since -- cgit v1.2.3