Skip to content
Permalink
Browse files

Fix crash when opening new virtual layer dialog

  • Loading branch information
nyalldawson committed Jan 26, 2016
1 parent 36b6a16 commit 1eedb06d3572226577543b03e47fcaa9c9ccddcb
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/providers/virtual/qgsvirtuallayersourceselect.cpp
@@ -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() )

0 comments on commit 1eedb06

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