lib/xmltree/xmlparse.cpp: fix (workaround?) for crash while parsing invalid saved xml

Origin commit data
------------------
Branch: ni/coolstream
Commit: c8b4d271f9
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-14 (Mon, 14 May 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-05-14 18:30:55 +04:00
parent f1a4e895d4
commit 4ce79b55bc

View File

@@ -392,7 +392,8 @@ long XML_Parser::GetCurrentByteIndex()
int XML_Parser::GetCurrentLineNumber()
{
if (eventPtr)
/* at EOF positionPtr point to input, while eventPtr not updated -- focus */
if (eventPtr && (positionPtr < eventPtr))
{
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr=eventPtr;