Browse Source

CoreGraphics: Fixed a leak when loading an empty MemoryBlock in juce_loadWithCoreImage()

v6.1.6
ed 4 years ago
parent
commit
76993469ea
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm

+ 3
- 0
modules/juce_graphics/native/juce_mac_CoreGraphicsContext.mm View File

@@ -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…
Cancel
Save