Skip to content

Commit

Permalink
Added two 0 pointer checks
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14245 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 18, 2010
1 parent b761df0 commit 3cdf4dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsvectorfilewriter.cpp
Expand Up @@ -568,7 +568,10 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,
{
try
{
fet.geometry()->transform( *ct );
if ( fet.geometry() )
{
fet.geometry()->transform( *ct );
}
}
catch ( QgsCsException &e )
{
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -3926,6 +3926,10 @@ void QgsVectorLayer::drawFeature( QgsRenderContext &renderContext,
bool needToTrim = false;

QgsGeometry* geom = fet.geometry();
if ( !geom )
{
return;
}
unsigned char* feature = geom->asWkb();

QGis::WkbType wkbType = geom->wkbType();
Expand Down

0 comments on commit 3cdf4dd

Please sign in to comment.