mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix leak when a layout cannot be added
This commit is contained in:
parent
6eed7dea05
commit
c1f0657036
@ -44,7 +44,10 @@ bool QgsLayoutManager::addLayout( QgsMasterLayoutInterface *layout )
|
|||||||
for ( QgsMasterLayoutInterface *l : qgis::as_const( mLayouts ) )
|
for ( QgsMasterLayoutInterface *l : qgis::as_const( mLayouts ) )
|
||||||
{
|
{
|
||||||
if ( l->name() == layout->name() )
|
if ( l->name() == layout->name() )
|
||||||
|
{
|
||||||
|
delete layout;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ugly, but unavoidable for interfaces...
|
// ugly, but unavoidable for interfaces...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user