Skip to content
Permalink
Browse files

Fix leak when converting 2.x compositions

  • Loading branch information
nyalldawson committed Mar 2, 2018
1 parent 55814b8 commit 70242a3ac4f26e36bafc6ce62fd09004cfec2307
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/layout/qgscompositionconverter.cpp
@@ -142,9 +142,9 @@ std::unique_ptr< QgsPrintLayout > QgsCompositionConverter::createLayoutFromCompo
QgsReadWriteContext context;
if ( project )
context.setPathResolver( project->pathResolver() );
QgsFillSymbol *symbol = QgsSymbolLayerUtils::loadSymbol<QgsFillSymbol>( symbolElement, context );
std::unique_ptr< QgsFillSymbol > symbol( QgsSymbolLayerUtils::loadSymbol<QgsFillSymbol>( symbolElement, context ) );
if ( symbol )
layout->pageCollection()->setPageStyleSymbol( symbol );
layout->pageCollection()->setPageStyleSymbol( symbol.get() );
}

QString name = composerElement.attribute( QStringLiteral( "name" ) );

0 comments on commit 70242a3

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