Skip to content
Permalink
Browse files
Fix some Coverity use-after-free warnings
(cherry-picked from eb39579)
  • Loading branch information
nyalldawson committed Apr 6, 2018
1 parent 2900ae2 commit 3db056975d4f7309aad523d640c3abf5d1a860aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
@@ -7368,8 +7368,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 )
@@ -961,8 +961,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 3db0569

Please sign in to comment.