Guard against crash when stopping a stream...
... caused by remembering a NULL pointer to active project when starting a stream. Hard to reproduce, but reported by David Bailes. We suspect that both the closing of another project window, and changes of focused application, are necessary to reproduce the problem.
This commit is contained in:
parent
b49e467412
commit
9694279804
|
@ -1643,6 +1643,12 @@ bool AudioIO::StartPortAudioStream(double sampleRate,
|
|||
mAudioFramesPerBuffer = 0;
|
||||
#endif
|
||||
mOwningProject = GetActiveProject();
|
||||
|
||||
// PRL: Protection from crash reported by David Bailes, involving starting
|
||||
// and stopping with frequent changes of active window, hard to reproduce
|
||||
if (!mOwningProject)
|
||||
return false;
|
||||
|
||||
mInputMeter = NULL;
|
||||
mOutputMeter = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue