Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Nov 7, 2009
1 parent 7e8124d commit 637910c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmaplayerregistry.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 637910c

Please sign in to comment.