Do not start a text generation thread if we're closing

Fixes occasional crash and makes no sense either :D
remotes/origin/KDE/4.12
Albert Astals Cid 12 years ago
parent cad1e895d2
commit a75a7ed086
  1. 2
      core/generator.cpp

@ -229,7 +229,7 @@ void Generator::generatePixmap( PixmapRequest *request )
* We create the text page for every page that is visible to the
* user, so he can use the text extraction tools without a delay.
*/
if ( hasFeature( TextExtraction ) && !request->page()->hasTextPage() && canGenerateTextPage() ) {
if ( hasFeature( TextExtraction ) && !request->page()->hasTextPage() && canGenerateTextPage() && !d->m_closing ) {
d->mTextPageReady = false;
d->textPageGenerationThread()->startGeneration( request->page() );
}

Loading…
Cancel
Save