defensive check added

This commit is contained in:
Uwe Rathmann 2024-10-30 09:37:00 +01:00
parent 5d73e5eda2
commit 93983e23c5

View File

@ -193,12 +193,13 @@ void QskBoxRenderer::setColoredBorderAndFillLines( const QRectF& rect,
const int fillCount = stroker.fillCount(); const int fillCount = stroker.fillCount();
const int borderCount = stroker.borderCount(); const int borderCount = stroker.borderCount();
auto lines = qskAllocateColoredLines( geometry, borderCount + fillCount ); if ( auto lines = qskAllocateColoredLines( geometry, borderCount + fillCount ) )
{
auto fillLines = fillCount ? lines : nullptr;
auto borderLines = borderCount ? lines + fillCount : nullptr;
auto fillLines = fillCount ? lines : nullptr; stroker.setBoxLines( borderLines, fillLines );
auto borderLines = borderCount ? lines + fillCount : nullptr; }
stroker.setBoxLines( borderLines, fillLines );
} }
else else
{ {