diff --git a/src/lib/definition.cpp b/src/lib/definition.cpp --- a/src/lib/definition.cpp +++ b/src/lib/definition.cpp @@ -171,7 +171,12 @@ bool Definition::isDelimiter(QChar c) const { - d->load(); + // We want isDelimiter() to work for invalid definitions as well. Therefore, + // call load() only for a valid Definition to read the delimiters from the xml files. + // For an invalid Definition, fallback to the default delimiters. + if (isValid()) { + d->load(); + } return d->isDelimiter(c); }