Skip to content
Permalink
Browse files

Fix leak when converting 2.x compositions

(cherry-picked from 70242a)
  • Loading branch information
nyalldawson committed Feb 27, 2018
1 parent 63d587c commit fc7b99eb554334d786dfed604b338f204c5186da
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 fc7b99e

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