aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-12-04 17:08:18 +0100
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-12-05 16:06:09 +0100
commit6ca59d925a4f5d04004abd47bde662c08dd15a07 (patch)
treec1996bee35837a4dc33fb702e724574448342865 /src
parent7c6f5f874774ffb97657a3101e4ce17a4ef7f113 (diff)
Fix warning: TypeError: Cannot read property 'selectByMouse' of null
When the item is undefined, we should not try to access it. Change-Id: I600130c6ed29beb93c9878298b0f1cf51f843d86 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/virtualkeyboard/content/components/ShadowInputControl.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtualkeyboard/content/components/ShadowInputControl.qml b/src/virtualkeyboard/content/components/ShadowInputControl.qml
index 95c1c97c..e36cf3d3 100644
--- a/src/virtualkeyboard/content/components/ShadowInputControl.qml
+++ b/src/virtualkeyboard/content/components/ShadowInputControl.qml
@@ -88,7 +88,7 @@ Item {
selectionColor: keyboard.style.fullScreenInputSelectionColor
selectedTextColor: keyboard.style.fullScreenInputSelectedTextColor
echoMode: (InputContext.inputMethodHints & Qt.ImhHiddenText) ? TextInput.Password : TextInput.Normal
- selectByMouse: !!InputContext.inputItem.selectByMouse
+ selectByMouse: !!InputContext.inputItem && !!InputContext.inputItem.selectByMouse
onCursorPositionChanged: {
cursorSyncTimer.restart()
blinkStatus = true