Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix from mloskot for vc++8 crashes
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5017 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 13, 2006
1 parent 54b5884 commit 1961569
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -620,7 +620,7 @@ void QgsOgrProvider::select(QgsRect *rect, bool useIntersect)
// spatial query to select features
std::cerr << "Selection rectangle is " << *rect << std::endl;
OGRGeometry *filter = 0;
filter = new OGRPolygon();
filter = OGRGeometryFactory::createGeometry(wkbPolygon);
QString wktExtent = QString("POLYGON ((%1))").arg(rect->asPolygon());
const char *wktText = (const char *)wktExtent;

Expand Down Expand Up @@ -651,9 +651,7 @@ void QgsOgrProvider::select(QgsRect *rect, bool useIntersect)
assert(result==OGRERR_NONE);
#endif
}

delete filter;

OGRGeometryFactory::destroyGeometry(filter);
} // QgsOgrProvider::select


Expand Down

0 comments on commit 1961569

Please sign in to comment.