Fix sporadic crash when running parttest

We use
  m_pageController
as guard for closing down instead of
  d->m_generator || d->m_closingLoop
since m_pageController is the first thing we set to 0 on closeDocument
This commit is contained in:
Albert Astals Cid 2014-08-01 01:27:27 +02:00
parent 375c72dc66
commit b7af929e5e

View file

@ -2836,7 +2836,7 @@ void Document::requestPixmaps( const QLinkedList< PixmapRequest * > & requests,
if ( requests.isEmpty() )
return;
if ( !d->m_generator || d->m_closingLoop )
if ( !d->m_pageController )
{
// delete requests..
QLinkedList< PixmapRequest * >::const_iterator rIt = requests.constBegin(), rEnd = requests.constEnd();
@ -4425,7 +4425,7 @@ void DocumentPrivate::calculateMaxTextPages()
void DocumentPrivate::textGenerationDone( Page *page )
{
if ( !m_generator || m_closingLoop ) return;
if ( !m_pageController ) return;
// 1. If we reached the cache limit, delete the first text page from the fifo
if (m_allocatedTextPagesFifo.size() == m_maxAllocatedTextPages)