Make sure layoutData exist before checking for string direction
Otherwise accessing that through QTextEngine::alignLine may cause crash. Reviewed-by: Samuel Rødal (cherry picked from commit dcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec)
This commit is contained in:
parent
044e7602ae
commit
d64460fffb
@ -1598,6 +1598,8 @@ bool QTextEngine::isRightToLeft() const
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!layoutData)
|
||||||
|
itemize();
|
||||||
// this places the cursor in the right position depending on the keyboard layout
|
// this places the cursor in the right position depending on the keyboard layout
|
||||||
if (layoutData->string.isEmpty())
|
if (layoutData->string.isEmpty())
|
||||||
return QApplication::keyboardInputDirection() == Qt::RightToLeft;
|
return QApplication::keyboardInputDirection() == Qt::RightToLeft;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user