Skip to content
Permalink
Browse files

[GRASS] coverity fixes

  • Loading branch information
blazek committed Oct 30, 2015
1 parent ad3efc0 commit 16e902b3c195bd3145fb3daff24aa5f514fba77b
Showing with 12 additions and 1 deletion.
  1. +5 −1 src/providers/grass/qgsgrass.cpp
  2. +7 −0 tests/src/providers/grass/testqgsgrassprovider.cpp
@@ -593,7 +593,11 @@ void QgsGrass::setLocation( QString gisdbase, QString location )
void QgsGrass::setMapset( QString gisdbase, QString location, QString mapset )
{
QgsDebugMsg( QString( "gisdbase = %1 location = %2 mapset = %3" ).arg( gisdbase, location, mapset ) );
init();
if ( !init() )
{
QgsDebugMsg( QgsGrass::initError() );
return;
}

// Set principal GRASS variables (in memory)
#ifdef Q_OS_WIN
@@ -1061,6 +1061,13 @@ void TestQgsGrassProvider::edit()

expectedLayer->startEditing();
}

if ( !grassLayer || !grassProvider || !expectedLayer )
{
reportRow( "grassLayer, grassProvider or expectedLayer is null" );
commandOk = false;
break;
}
else if ( command.command == TestQgsGrassCommand::CommitChanges )
{
grassLayer->commitChanges();

0 comments on commit 16e902b

Please sign in to comment.