diff --git a/generators/epub/converter.cpp b/generators/epub/converter.cpp --- a/generators/epub/converter.cpp +++ b/generators/epub/converter.cpp @@ -203,10 +203,13 @@ QVector soundActions; const QSize videoSize(320, 240); do{ - movieAnnots.clear(); - soundActions.clear(); + if(!epub_it_get_curr(it)) { + continue; + } + + movieAnnots.clear(); + soundActions.clear(); - if(epub_it_get_curr(it)) { const QString link = QString::fromUtf8(epub_it_get_curr_url(it)); mTextDocument->setCurrentSubDocument(link); QString htmlContent = QString::fromUtf8(epub_it_get_curr(it)); @@ -354,7 +357,7 @@ while(mTextDocument->pageCount() == page) _cursor->insertText(QStringLiteral("\n")); - } + } while (epub_it_get_next(it)); epub_free_iterator(it);