Browse Source

macOS: Prevent an empty RectangleList from incorrectly filling a graphics context

v7.0.12
Anthony Nicholls 1 year ago
parent
commit
525e9e9ded
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm

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

@@ -593,6 +593,9 @@ void CoreGraphicsContext::drawLine (const Line<float>& line)
void CoreGraphicsContext::fillRectList (const RectangleList<float>& list)
{
if (list.isEmpty())
return;
std::vector<CGRect> rects;
rects.reserve ((size_t) list.getNumRectangles());


Loading…
Cancel
Save