Skip to content
Permalink
Browse files

make QgsMapLayerRegistry::addLayer() a bit more robust

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11961 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 7, 2009
1 parent 7e8124d commit 637910c8f04a11c0a85c411e865189f39b3facb9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsmaplayerregistry.cpp
@@ -66,7 +66,7 @@ QgsMapLayer * QgsMapLayerRegistry::mapLayer( QString theLayerId )
QgsMapLayer *
QgsMapLayerRegistry::addMapLayer( QgsMapLayer * theMapLayer, bool theEmitSignal )
{
if ( !theMapLayer->isValid() )
if ( !theMapLayer || !theMapLayer->isValid() )
{
QgsDebugMsg( "cannot add invalid layers" );
return 0;

0 comments on commit 637910c

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