Skip to content
Permalink
Browse files

fix zoom to layer extent crash (fixes #10516)

  • Loading branch information
jef-n committed Jun 9, 2014
1 parent 13b0334 commit 2e2853a1f6e4eafe8920c47b9569cec9a0bc2978
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/gui/layertree/qgslayertreeviewdefaultactions.cpp
@@ -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 )

0 comments on commit 2e2853a

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