Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f58eb13

Browse files
committedMay 30, 2019
Don't crash when copying layout elements
Guard for existing multiFrames Fixes #29747
1 parent 2274d56 commit f58eb13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/gui/layout/qgslayoutview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void QgsLayoutView::copyItems( const QList<QgsLayoutItem *> &items, QgsLayoutVie
339339
else if ( QgsLayoutFrame *frame = qobject_cast<QgsLayoutFrame *>( item ) )
340340
{
341341
// copy multiframe too
342-
if ( !copiedMultiFrames.contains( frame->multiFrame() ) )
342+
if ( frame->multiFrame() && !copiedMultiFrames.contains( frame->multiFrame() ) )
343343
{
344344
frame->multiFrame()->writeXml( documentElement, doc, context );
345345
copiedMultiFrames.insert( frame->multiFrame() );

0 commit comments

Comments
 (0)
Please sign in to comment.