Skip to content

Commit

Permalink
defensive check added
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Oct 30, 2024
1 parent 5d73e5e commit 93983e2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/nodes/QskBoxRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,13 @@ void QskBoxRenderer::setColoredBorderAndFillLines( const QRectF& rect,
const int fillCount = stroker.fillCount();
const int borderCount = stroker.borderCount();

auto lines = qskAllocateColoredLines( geometry, borderCount + fillCount );

auto fillLines = fillCount ? lines : nullptr;
auto borderLines = borderCount ? lines + fillCount : nullptr;
if ( auto lines = qskAllocateColoredLines( geometry, borderCount + fillCount ) )
{
auto fillLines = fillCount ? lines : nullptr;
auto borderLines = borderCount ? lines + fillCount : nullptr;

stroker.setBoxLines( borderLines, fillLines );
stroker.setBoxLines( borderLines, fillLines );
}
}
else
{
Expand Down

0 comments on commit 93983e2

Please sign in to comment.