Skip to content

Commit 1961569

Browse files
author
mhugent
committed
fix from mloskot for vc++8 crashes
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5017 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 54b5884 commit 1961569

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/providers/ogr/qgsogrprovider.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ void QgsOgrProvider::select(QgsRect *rect, bool useIntersect)
620620
// spatial query to select features
621621
std::cerr << "Selection rectangle is " << *rect << std::endl;
622622
OGRGeometry *filter = 0;
623-
filter = new OGRPolygon();
623+
filter = OGRGeometryFactory::createGeometry(wkbPolygon);
624624
QString wktExtent = QString("POLYGON ((%1))").arg(rect->asPolygon());
625625
const char *wktText = (const char *)wktExtent;
626626

@@ -651,9 +651,7 @@ void QgsOgrProvider::select(QgsRect *rect, bool useIntersect)
651651
assert(result==OGRERR_NONE);
652652
#endif
653653
}
654-
655-
delete filter;
656-
654+
OGRGeometryFactory::destroyGeometry(filter);
657655
} // QgsOgrProvider::select
658656

659657

0 commit comments

Comments
 (0)