CodeEditor fixed

This commit is contained in:
Arin Alexander 2017-11-10 00:47:47 +03:00
parent beaef31c69
commit 9e4025f886

View File

@ -186,8 +186,8 @@ bool CodeEditor::matchLeftParenthesis(QTextBlock currentBlock, QChar parenthesis
bool CodeEditor::matchRightParenthesis(QTextBlock currentBlock, QChar parenthesisType, int i, int numRightParentheses)
{
TextBlockData *data = static_cast<TextBlockData *>(currentBlock.userData());
QVector<ParenthesisInfo *> parentheses = data->parentheses();
if (data){
QVector<ParenthesisInfo *> parentheses = data->parentheses();
int docPos = currentBlock.position();
for (; i > -1 && parentheses.size() > 0; --i) {
ParenthesisInfo *info = parentheses.at(i);