Skip to content

Commit

Permalink
Don't crash when copying layout elements
Browse files Browse the repository at this point in the history
Guard for existing multiFrames

Fixes #29747
  • Loading branch information
elpaso committed May 30, 2019
1 parent 44d993d commit 8988fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void QgsLayoutView::copyItems( const QList<QgsLayoutItem *> &items, QgsLayoutVie
else if ( QgsLayoutFrame *frame = qobject_cast<QgsLayoutFrame *>( item ) )
{
// copy multiframe too
if ( !copiedMultiFrames.contains( frame->multiFrame() ) )
if ( frame->multiFrame() && !copiedMultiFrames.contains( frame->multiFrame() ) )
{
frame->multiFrame()->writeXml( documentElement, doc, context );
copiedMultiFrames.insert( frame->multiFrame() );
Expand Down

0 comments on commit 8988fbc

Please sign in to comment.