mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
CoreGraphics: Fixed a leak when loading an empty MemoryBlock in juce_loadWithCoreImage()
This commit is contained in:
parent
5bff5dc9c8
commit
76993469ea
1 changed files with 3 additions and 0 deletions
|
|
@ -829,6 +829,9 @@ Image juce_loadWithCoreImage (InputStream& input)
|
|||
MemoryBlockHolder::Ptr memBlockHolder = new MemoryBlockHolder();
|
||||
input.readIntoMemoryBlock (memBlockHolder->block, -1);
|
||||
|
||||
if (memBlockHolder->block.getSize() == 0)
|
||||
return {};
|
||||
|
||||
#if JUCE_IOS
|
||||
JUCE_AUTORELEASEPOOL
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue