Opened 15 years ago
Closed 15 years ago
#1605 closed bug (fixed)
QgsGeometry().fromPolygon([[]]) crashes Qgis
Reported by: | Barryrowlingson | Owned by: | nobody |
---|---|---|---|
Priority: | critical: causes crash or data corruption | Milestone: | |
Component: | Vectors | Version: | 1.0.0 |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | Linux |
Platform Version: | Awaiting user input: | no |
Description
I can make a geometry like this:
pol = [ QgsPoint(0,0),QgsPoint(0,1),QgsPoint(1,1)] QgsGeometry.fromPolygon([pol])
<qgis.core.QgsGeometry object at 0x998aeac>
but if I do:
pol = [] QgsGeometry.fromPolygon([pol])
- crash:
Fatal: ASSERT failure in QVector<T>::operator[]: "index out of range", file /usr/include/qt4/QtCore/qvector.h, line 320
- this happened when a selection tool I wrote was trying to create a geometry from a list of coordinates that it hadn't filled yet. Carson Farmer had the same problem.
Note:
See TracTickets
for help on using tickets.
Fixed in r10448 (trunk) and r10449 (1.0)
Martin