Skip to content

Commit

Permalink
fix zoom to layer extent crash (fixes #10516)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 9, 2014
1 parent 13b0334 commit 2e2853a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/layertree/qgslayertreeviewdefaultactions.cpp
Expand Up @@ -198,9 +198,8 @@ void QgsLayerTreeViewDefaultActions::zoomToLayers( QgsMapCanvas* canvas, const Q
QgsMapLayer* layer = layers.at( i );
QgsRectangle layerExtent = layer->extent();

QgsVectorLayer* vLayer = qobject_cast<QgsVectorLayer*>( layer );

if ( vLayer->geometryType() == QGis::NoGeometry )
QgsVectorLayer *vLayer = qobject_cast<QgsVectorLayer*>( layer );
if ( vlayer && vLayer->geometryType() == QGis::NoGeometry )
continue;

if ( layerExtent.isEmpty() && layer->type() == QgsMapLayer::VectorLayer )
Expand Down

0 comments on commit 2e2853a

Please sign in to comment.