Navigation Menu

Skip to content

Commit

Permalink
Fixed timing/dangling pointer error in delimited text provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrook committed Mar 21, 2015
1 parent 60fcc4d commit 308bbb6
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -447,7 +447,7 @@ void QgsDelimitedTextFeatureIterator::fetchAttribute( QgsFeature& feature, int f

QgsDelimitedTextFeatureSource::QgsDelimitedTextFeatureSource( const QgsDelimitedTextProvider* p )
: mGeomRep( p->mGeomRep )
, mSubsetExpression( p->mSubsetExpression )
, mSubsetExpression( p->mSubsetExpression ? new QgsExpression(p->mSubsetExpression->expression()) : 0 )
, mExtent( p->mExtent )
, mUseSpatialIndex( p->mUseSpatialIndex )
, mSpatialIndex( p->mSpatialIndex ? new QgsSpatialIndex( *p->mSpatialIndex ) : 0 )
Expand All @@ -472,6 +472,7 @@ QgsDelimitedTextFeatureSource::QgsDelimitedTextFeatureSource( const QgsDelimited

QgsDelimitedTextFeatureSource::~QgsDelimitedTextFeatureSource()
{
delete mSubsetExpression;
delete mSpatialIndex;
delete mFile;
}
Expand Down

2 comments on commit 308bbb6

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccrook should these provider fixes be backported to 2.8?

@ccrook
Copy link
Contributor Author

@ccrook ccrook commented on 308bbb6 Mar 22, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson Yes .. good thought.

Please sign in to comment.