emit q->readyRead();
if ( !thisPointer )
- return;
- qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter );
- synchronized( reader ) {
- qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter );
- reader->readyReadSentCondition.wakeAll();
+ return;
+
+ if ( reader ) {
+ qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter );
+ synchronized( reader ) {
+ qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter );
+ reader->readyReadSentCondition.wakeAll();
+ }
}
qDebug( "KDPipeIODevice::Private::emitReadyRead %p leaving %d", this, counter );
while ( !cancel && !error && bufferFull() ) {
notifyReadyRead();
- if ( bufferFull() ) {
+ if ( !cancel && bufferFull() ) {
qDebug( "%p: Reader::run: buffer is full, going to sleep", this );
bufferNotFullCondition.wait( &mutex );
}