File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -190,12 +190,19 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature )
190
190
(( mRequest .flags () & QgsFeatureRequest::ExactIntersect ) != 0 && ( !mConnection ->hasSpatial () || !mSource ->mHasSpatialIndex ) ) )
191
191
{
192
192
QByteArray *ba = static_cast <QByteArray*>( mQry .value ( col++ ).data () );
193
- unsigned char *copy = new unsigned char [ba->size ()];
194
- memcpy ( copy, ba->constData (), ba->size () );
193
+ if ( ba->size () > 0 )
194
+ {
195
+ unsigned char *copy = new unsigned char [ba->size ()];
196
+ memcpy ( copy, ba->constData (), ba->size () );
195
197
196
- QgsGeometry *g = new QgsGeometry ();
197
- g->fromWkb ( copy, ba->size () );
198
- feature.setGeometry ( g );
198
+ QgsGeometry *g = new QgsGeometry ();
199
+ g->fromWkb ( copy, ba->size () );
200
+ feature.setGeometry ( g );
201
+ }
202
+ else
203
+ {
204
+ feature.setGeometry ( 0 );
205
+ }
199
206
200
207
if (( mRequest .flags () & QgsFeatureRequest::ExactIntersect ) != 0 && ( !mConnection ->hasSpatial () || !mSource ->mHasSpatialIndex ) &&
201
208
mRequest .filterType () == QgsFeatureRequest::FilterRect &&
You can’t perform that action at this time.
0 commit comments