diff --git a/core/document.cpp b/core/document.cpp index 6c8c6e33e..14737d2d4 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -1206,9 +1206,6 @@ Document::Document( QWidget *widget ) Document::~Document() { - // stop any audio playback - AudioPlayer::instance()->stopPlaybacks(); - // delete generator, pages, and related stuff closeDocument(); @@ -1493,6 +1490,9 @@ void Document::closeDocument() d->m_fontThread = 0; } + // stop any audio playback + AudioPlayer::instance()->stopPlaybacks(); + // close the current document and save document info if a document is still opened if ( d->m_generator && d->m_pagesVector.size() > 0 ) {