1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Small fix for File::createInputStream.

This commit is contained in:
jules 2013-02-21 09:54:05 +00:00
parent 27895cb6bd
commit 2266501eb9
2 changed files with 5 additions and 3 deletions

View file

@ -107,7 +107,7 @@ public:
let this pass through without being overwritten or cleared.
Also note that the buffer may have more channels than are strictly necessary,
but your should only read/write from the ones that your filter is supposed to
but you should only read/write from the ones that your filter is supposed to
be using.
The number of samples in these buffers is NOT guaranteed to be the same for every

View file

@ -654,8 +654,10 @@ bool File::startAsProcess (const String& parameters) const
//==============================================================================
FileInputStream* File::createInputStream() const
{
if (existsAsFile())
return new FileInputStream (*this);
ScopedPointer<FileInputStream> fin (new FileInputStream (*this));
if (fin->openedOk())
return fin.release();
return nullptr;
}