diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-03-15 06:22:13 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-03-15 06:22:13 (GMT) |
commit | e546b6b38f95e6496fd53efba41442cde879819a (patch) | |
tree | f5febe536df2f99d3a5468d3dd0f898297317600 /src/gui/inputmethod/qcoefepinputcontext_s60.cpp | |
parent | f2e7cc83f998f77041e7a4a136baacb1534509b1 (diff) | |
download | Qt-e546b6b38f95e6496fd53efba41442cde879819a.zip Qt-e546b6b38f95e6496fd53efba41442cde879819a.tar.gz Qt-e546b6b38f95e6496fd53efba41442cde879819a.tar.bz2 |
Prevent null pointer crash when closing splitview
Prevents crash when focus item is not set and splitview is closed.
This is partial fix to QTBUG-17045.
Task-number: QTBUG-17045
Reviewed-by: Guoqing Zhang
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 73aa982..9d8dd41 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -394,7 +394,8 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget) if (!alwaysResize) { if (gv->scene()) { - disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); + if (gv->scene()->focusItem()) + disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget())); QGraphicsItem *rootItem; foreach (QGraphicsItem *item, gv->scene()->items()) { if (!item->parentItem()) { |