diff --git a/src/framework/global/serialization/xmlstreamreader.cpp b/src/framework/global/serialization/xmlstreamreader.cpp index dafb02b2a9029..5f24fa558d100 100644 --- a/src/framework/global/serialization/xmlstreamreader.cpp +++ b/src/framework/global/serialization/xmlstreamreader.cpp @@ -458,6 +458,10 @@ double XmlStreamReader::readDouble(bool* ok) int64_t XmlStreamReader::lineNumber() const { + if (!m_xml->doc.Error() && m_xml->node) { + return m_xml->node->GetLineNum(); + } + return m_xml->doc.ErrorLineNum(); }