Skip to content

Commit

Permalink
fix from mloskot for vc++8 crashes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5017 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 13, 2006
1 parent 2a1887f commit 3688f7c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
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 3688f7c

Please sign in to comment.