mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-10 00:05:25 -04:00
Fix crash when trying to insert geometry into collection with bad index
This commit is contained in:
parent
6d59d144b5
commit
33ba9a8c48
@ -128,6 +128,8 @@ bool QgsGeometryCollection::insertGeometry( QgsAbstractGeometry *g, int index )
|
||||
return false;
|
||||
}
|
||||
|
||||
index = std::min( mGeometries.count(), index );
|
||||
|
||||
mGeometries.insert( index, g );
|
||||
clearCache(); //set bounding box invalid
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user