Bug fix: avoid infinite loop when looking for a declaration. Bug exposed by SVN commit 5383.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5390 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2013-01-31 14:03:44 +00:00
parent 667a6a8176
commit ad4c417d46
1 changed files with 1 additions and 1 deletions

View File

@ -1560,7 +1560,7 @@ XmlSaxParser::Error XmlDocument::addChild(XmlChild* child)
// Retrieve the document declaration
XmlDeclaration* XmlDocument::declaration() const
{
for (ObjList* o = m_beforeRoot.getChildren().skipNull(); o; o = o->skipNull()) {
for (ObjList* o = m_beforeRoot.getChildren().skipNull(); o; o = o->skipNext()) {
XmlDeclaration* d = (static_cast<XmlChild*>(o->get()))->xmlDeclaration();
if (d)
return d;