Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_16] Fix crash when rendering clipped features and clipped shape results in promoting a single part geometry to multipart #45422

Merged
merged 1 commit into from
Oct 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/symbology/qgssymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,15 +1075,15 @@ void QgsSymbol::renderFeature( const QgsFeature &feature, QgsRenderContext &cont

case QgsWkbTypes::MultiPoint:
{
const QgsMultiPoint *mp = qgsgeometry_cast< const QgsMultiPoint * >( part );
const QgsMultiPoint *mp = qgsgeometry_cast< const QgsMultiPoint * >( processedGeometry );
markers.reserve( mp->numGeometries() );
}
FALLTHROUGH
case QgsWkbTypes::MultiCurve:
case QgsWkbTypes::MultiLineString:
case QgsWkbTypes::GeometryCollection:
{
const QgsGeometryCollection *geomCollection = qgsgeometry_cast<const QgsGeometryCollection *>( part );
const QgsGeometryCollection *geomCollection = qgsgeometry_cast<const QgsGeometryCollection *>( processedGeometry );

const unsigned int num = geomCollection->numGeometries();
for ( unsigned int i = 0; i < num; ++i )
Expand All @@ -1107,7 +1107,7 @@ void QgsSymbol::renderFeature( const QgsFeature &feature, QgsRenderContext &cont

QPolygonF pts;

const QgsGeometryCollection *geomCollection = dynamic_cast<const QgsGeometryCollection *>( part );
const QgsGeometryCollection *geomCollection = dynamic_cast<const QgsGeometryCollection *>( processedGeometry );
const unsigned int num = geomCollection->numGeometries();

// Sort components by approximate area (probably a bit faster than using
Expand Down