Commit 3cd8fe05 authored by frmdstryr's avatar frmdstryr Committed by Sven Brauch
Browse files

Fix crash if errline is invalid due to syntax error

parent bf986340
......@@ -216,7 +216,7 @@ CodeAst::Ptr AstBuilder::parse(const QUrl& filename, QString &contents)
qCWarning(KDEV_PYTHON_PARSER) << "Discarding parts of the code to be parsed because of previous errors";
qCDebug(KDEV_PYTHON_PARSER) << indents;
int indentAtError = indents.at(errline);
int indentAtError = errline < indents.length() ? indents.at(errline): 0;
QChar c;
bool atLineBeginning = true;
int currentIndent = -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment