Skip to content
Permalink
Browse files

oracle provider: handle empty geometries (fixes #14631)

(cherry picked from commit d07bc18)
  • Loading branch information
jef-n committed Apr 8, 2016
1 parent 28d2547 commit dc791fda182f7c29a287ba6f3fe95e7984b9f49c
Showing with 12 additions and 5 deletions.
  1. +12 −5 src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -190,12 +190,19 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature )
(( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) != 0 && ( !mConnection->hasSpatial() || !mSource->mHasSpatialIndex ) ) )
{
QByteArray *ba = static_cast<QByteArray*>( mQry.value( col++ ).data() );
unsigned char *copy = new unsigned char[ba->size()];
memcpy( copy, ba->constData(), ba->size() );
if ( ba->size() > 0 )
{
unsigned char *copy = new unsigned char[ba->size()];
memcpy( copy, ba->constData(), ba->size() );

QgsGeometry *g = new QgsGeometry();
g->fromWkb( copy, ba->size() );
feature.setGeometry( g );
QgsGeometry *g = new QgsGeometry();
g->fromWkb( copy, ba->size() );
feature.setGeometry( g );
}
else
{
feature.setGeometry( 0 );
}

if (( mRequest.flags() & QgsFeatureRequest::ExactIntersect ) != 0 && ( !mConnection->hasSpatial() || !mSource->mHasSpatialIndex ) &&
mRequest.filterType() == QgsFeatureRequest::FilterRect &&

0 comments on commit dc791fd

Please sign in to comment.
You can’t perform that action at this time.