File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ class QgsVectorLayer : QgsMapLayer
284284 /** Removes a vector layer join */
285285 void removeJoin( const QString& joinLayerId );
286286
287- const QList< QgsVectorJoinInfo >& vectorJoins() const;
287+ const QList< QgsVectorJoinInfo > vectorJoins() const;
288288
289289 /**
290290 * Add a new field which is calculated by the expression specified
Original file line number Diff line number Diff line change @@ -1867,7 +1867,7 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::writeAsVectorFormat( QgsVe
18671867
18681868 QGis::WkbType wkbType = layer->wkbType ();
18691869
1870- if ( layer->providerType () == " ogr" )
1870+ if ( layer->providerType () == " ogr" && layer-> dataProvider () )
18711871 {
18721872 QStringList theURIParts = layer->dataProvider ()->dataSourceUri ().split ( " |" );
18731873 QString srcFileName = theURIParts[0 ];
Original file line number Diff line number Diff line change @@ -2840,7 +2840,7 @@ int QgsVectorLayer::fieldNameIndex( const QString& fieldName ) const
28402840
28412841bool QgsVectorLayer::addJoin ( const QgsVectorJoinInfo& joinInfo )
28422842{
2843- return mJoinBuffer ->addJoin ( joinInfo );
2843+ return mJoinBuffer && mJoinBuffer ->addJoin ( joinInfo );
28442844}
28452845
28462846void QgsVectorLayer::checkJoinLayerRemove ( QString theLayerId )
@@ -2850,12 +2850,16 @@ void QgsVectorLayer::checkJoinLayerRemove( QString theLayerId )
28502850
28512851void QgsVectorLayer::removeJoin ( const QString& joinLayerId )
28522852{
2853- mJoinBuffer ->removeJoin ( joinLayerId );
2853+ if ( mJoinBuffer )
2854+ mJoinBuffer ->removeJoin ( joinLayerId );
28542855}
28552856
2856- const QList< QgsVectorJoinInfo >& QgsVectorLayer::vectorJoins () const
2857+ const QList< QgsVectorJoinInfo > QgsVectorLayer::vectorJoins () const
28572858{
2858- return mJoinBuffer ->vectorJoins ();
2859+ if ( mJoinBuffer )
2860+ return mJoinBuffer ->vectorJoins ();
2861+ else
2862+ return QList< QgsVectorJoinInfo >();
28592863}
28602864
28612865void QgsVectorLayer::addExpressionField ( const QString& exp, const QgsField& fld )
Original file line number Diff line number Diff line change @@ -647,7 +647,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
647647 /* * Removes a vector layer join */
648648 void removeJoin ( const QString& joinLayerId );
649649
650- const QList< QgsVectorJoinInfo >& vectorJoins () const ;
650+ const QList<QgsVectorJoinInfo> vectorJoins () const ;
651651
652652 /* *
653653 * Add a new field which is calculated by the expression specified
You can’t perform that action at this time.
0 commit comments