iOS: ensure we have a valid focusObject before sending it IM events

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ø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2014-10-17 10:59:44 +02:00
parent 0ed65a6513
commit e57153b082

View File

@ -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