1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Added a check in ImagePreviewComponent to avoid reading directories

This commit is contained in:
ed 2017-03-10 14:39:17 +00:00
parent f506cc7f5d
commit beab10fca7

View file

@ -63,7 +63,7 @@ void ImagePreviewComponent::timerCallback()
ScopedPointer<FileInputStream> in (fileToLoad.createInputStream());
if (in != nullptr)
if (in != nullptr && in->getFile().existsAsFile())
{
if (ImageFileFormat* const format = ImageFileFormat::findImageFormatForStream (*in))
{