]> Repos - portaudio/commitdiff
Commit fix for crash during full-duplex operation with PulseAudio. Reported by Al...
authorrichard_ash <richard_ash@0f58301d-fd10-0410-b4af-bbb618454e57>
Fri, 12 Nov 2010 17:16:21 +0000 (17:16 +0000)
committerrichard_ash <richard_ash@0f58301d-fd10-0410-b4af-bbb618454e57>
Fri, 12 Nov 2010 17:16:21 +0000 (17:16 +0000)
src/common/pa_process.c

index 01a9ee29ea2292dc5b8d13d6382efa8d5aed0287..38305320bfbf3ac8abf422cffabe5ef5afd8d819 100644 (file)
@@ -764,7 +764,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
                     destChannelStrideBytes = bp->bytesPerUserInputSample;
 
                     /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved */
-                    if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved )
+                    if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data)
                     {
                         userInput = hostInputChannels[0].data;
                         destBytePtr = (unsigned char *)hostInputChannels[0].data;
@@ -781,7 +781,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
                     destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample;
 
                     /* setup non-interleaved ptrs */
-                    if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved )
+                    if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data )
                     {
                         for( i=0; i<bp->inputChannelCount; ++i )
                         {