fix core in getHeaderTagBuf() func

This commit is contained in:
mwells 2014-08-01 20:31:31 -07:00
parent 030e1c7c1f
commit 425ef7f425

View File

@ -30169,7 +30169,13 @@ SafeBuf *XmlDoc::getHeaderTagBuf() {
for ( ; si ; si = si->m_next ) {
// breathe
QUICKPOLL(m_niceness);
if ( si->m_tagId == TAG_H1 ) break;
if ( si->m_tagId != TAG_H1 ) continue;
// if it contains now text, this will be -1
// so give up on it
if ( si->m_firstWordPos < 0 ) continue;
if ( si->m_lastWordPos < 0 ) continue;
// ok, it works, get it
break;
}
// if no h1 tag then make buf empty
if ( ! si ) {