Skip to content
Permalink
Browse files

Fix some Coverity use-after-free warnings

  • Loading branch information
nyalldawson committed Apr 3, 2018
1 parent cf905c9 commit eb3957983709090e7e635cde371c998dc9799894
Showing with 6 additions and 4 deletions.
  1. +4 −2 src/app/qgisapp.cpp
  2. +2 −2 src/core/processing/models/qgsprocessingmodelalgorithm.cpp
@@ -7446,8 +7446,10 @@ QgsLayoutDesignerDialog *QgisApp::createNewPrintLayout( const QString &t )
QgsPrintLayout *layout = new QgsPrintLayout( QgsProject::instance() );
layout->setName( title );
layout->initializeDefaults();
QgsProject::instance()->layoutManager()->addLayout( layout );
return openLayoutDesignerDialog( layout );
if ( QgsProject::instance()->layoutManager()->addLayout( layout ) )
return openLayoutDesignerDialog( layout );
else
return nullptr;
}

QgsLayoutDesignerDialog *QgisApp::createNewReport( QString title )
@@ -969,8 +969,8 @@ bool QgsProcessingModelAlgorithm::activateChildAlgorithm( const QString &id )

void QgsProcessingModelAlgorithm::addModelParameter( QgsProcessingParameterDefinition *definition, const QgsProcessingModelParameter &component )
{
addParameter( definition );
mParameterComponents.insert( definition->name(), component );
if ( addParameter( definition ) )
mParameterComponents.insert( definition->name(), component );
}

void QgsProcessingModelAlgorithm::updateModelParameter( QgsProcessingParameterDefinition *definition )

0 comments on commit eb39579

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