Skip to content
Permalink
Browse files

Fix leak when a layout cannot be added

  • Loading branch information
nyalldawson committed Jan 24, 2018
1 parent 6eed7de commit c1f0657036a6ef49259d629f7183903044f5c712
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/layout/qgslayoutmanager.cpp
@@ -44,7 +44,10 @@ bool QgsLayoutManager::addLayout( QgsMasterLayoutInterface *layout )
for ( QgsMasterLayoutInterface *l : qgis::as_const( mLayouts ) )
{
if ( l->name() == layout->name() )
{
delete layout;
return false;
}
}

// ugly, but unavoidable for interfaces...

0 comments on commit c1f0657

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