Skip to content
Permalink
Browse files

Don't crash the projection selection widget when world_map.shp fails …

…to load (#5977)

* initiate mExpressionFieldBuffer in the constructor
  • Loading branch information
nirvn committed Jan 3, 2018
1 parent 6ed078c commit df547e12315c12b94a68f06400cee1c117d797e8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsvectorlayer.cpp
@@ -149,6 +149,7 @@ QgsVectorLayer::QgsVectorLayer( const QString &vectorLayerPath,
mJoinBuffer = new QgsVectorLayerJoinBuffer( this );
connect( mJoinBuffer, &QgsVectorLayerJoinBuffer::joinedFieldsChanged, this, &QgsVectorLayer::onJoinedFieldsChanged );

mExpressionFieldBuffer = new QgsExpressionFieldBuffer();
// if we're given a provider type, try to create and bind one to this layer
if ( !vectorLayerPath.isEmpty() && !mProviderKey.isEmpty() )
{
@@ -1555,7 +1556,6 @@ bool QgsVectorLayer::setDataProvider( QString const &provider )
// get and store the feature type
mWkbType = mDataProvider->wkbType();

mExpressionFieldBuffer = new QgsExpressionFieldBuffer();
updateFields();

if ( mProviderKey == QLatin1String( "postgres" ) )

2 comments on commit df547e1

@elpaso

This comment has been minimized.

Copy link
Contributor

@elpaso elpaso replied Jan 3, 2018

Thanks! Would you also please check if all the related bugs in the hub are closed/updated ?

@nirvn

This comment has been minimized.

Copy link
Contributor Author

@nirvn nirvn replied Jan 3, 2018

@elpaso , yeah, I want to give it 24 hours so folks can test a nightly and confirm that it did fix their respective crash. Hopefully this was a catch-all fix ;)

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