diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index c69fd50ff4d50aa16cd8e4c376ffb20187197c1d..b21843e4af7b2a1c2b800b60ebebe3d5f3e81221 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -1728,7 +1728,7 @@ QSGNode *QQuickTextInput::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext(), this); d->textNode = node; - if (!d->textLayoutDirty) { + if (!d->textLayoutDirty && oldNode != 0) { QSGSimpleRectNode *cursorNode = node->cursorNode(); if (cursorNode != 0 && !isReadOnly()) { cursorNode->setRect(cursorRectangle());