Skip to content

Commit

Permalink
Fix crash when opening new virtual layer dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 26, 2016
1 parent 36b6a16 commit 1eedb06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/virtual/qgsvirtuallayersourceselect.cpp
Expand Up @@ -117,6 +117,8 @@ void QgsVirtualLayerSourceSelect::onLayerComboChanged( int idx )

QString lid = mLayerNameCombo->itemData( idx ).toString();
QgsVectorLayer* l = static_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( lid ) );
if ( !l )
return;
QgsVirtualLayerDefinition def = QgsVirtualLayerDefinition::fromUrl( QUrl::fromEncoded( l->source().toUtf8() ) );

if ( !def.query().isEmpty() )
Expand Down

0 comments on commit 1eedb06

Please sign in to comment.