Skip to content

Commit

Permalink
import vector layer: fix override layer option (follow f8d5d43)
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Apr 15, 2012
1 parent f538dc8 commit d419b58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgsvectorlayerimport.cpp
Expand Up @@ -215,7 +215,11 @@ QgsVectorLayerImport::importLayer( QgsVectorLayer* layer,
}
}

bool overwrite = options->take( "overwrite" ).toBool();
bool overwrite = false;
if ( options )
{
overwrite = options->take( "overwrite" ).toBool();
}

QgsVectorLayerImport * writer =
new QgsVectorLayerImport( uri, providerKey, fields, layer->wkbType(), outputCRS, overwrite, options );
Expand Down

0 comments on commit d419b58

Please sign in to comment.