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 2274d56 commit f58eb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutview.cpp
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 f58eb13

Please sign in to comment.