Skip to content

Commit

Permalink
canvas: don't try to connect to null layers
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 2, 2017
1 parent bceb8ff commit d315fdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -310,6 +310,8 @@ void QgsMapCanvas::setLayers( const QList<QgsMapLayer*>& layers )

Q_FOREACH ( QgsMapLayer* layer, layers )
{
if ( !layer )
continue;
connect( layer, &QgsMapLayer::repaintRequested, this, &QgsMapCanvas::layerRepaintRequested );
connect( layer, &QgsMapLayer::crsChanged, this, &QgsMapCanvas::layerCrsChange );
connect( layer, &QgsMapLayer::autoRefreshIntervalChanged, this, &QgsMapCanvas::updateAutoRefreshTimer );
Expand Down

0 comments on commit d315fdf

Please sign in to comment.