Skip to content
Permalink
Browse files

Fix a crash on exit

  • Loading branch information
nyalldawson committed Dec 11, 2017
1 parent 6f47c6a commit c0f4d0f43a8488cd38f62a72981d69ed338d11ad
Showing with 6 additions and 1 deletion.
  1. +5 −0 src/gui/layout/qgslayoutviewtoolselect.cpp
  2. +1 −1 src/gui/layout/qgslayoutviewtoolselect.h
@@ -33,7 +33,12 @@ QgsLayoutViewToolSelect::QgsLayoutViewToolSelect( QgsLayoutView *view )
QgsLayoutViewToolSelect::~QgsLayoutViewToolSelect()
{
if ( mMouseHandles )
{
// want to force them to be removed from the scene
if ( mMouseHandles->scene() )
mMouseHandles->scene()->removeItem( mMouseHandles );
mMouseHandles->deleteLater();
}
}

void QgsLayoutViewToolSelect::layoutPressEvent( QgsLayoutViewMouseEvent *event )
@@ -73,7 +73,7 @@ class GUI_EXPORT QgsLayoutViewToolSelect : public QgsLayoutViewTool
//! Start of rubber band creation
QPointF mRubberBandStartPos;

QgsLayoutMouseHandles *mMouseHandles = nullptr; //owned by scene
QPointer< QgsLayoutMouseHandles > mMouseHandles; //owned by scene
};

#endif // QGSLAYOUTVIEWTOOLSELECT_H

0 comments on commit c0f4d0f

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