diff --git a/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp b/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp index 3344885ec9..6f396945fd 100644 --- a/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp +++ b/ApplicationCode/UserInterface/RiuMultiPlotPage.cpp @@ -216,9 +216,9 @@ void RiuMultiPlotPage::removePlot( RiuQwtPlotWidget* plotWidget ) if ( legend ) { legend->setParent( nullptr ); - m_legends.removeAt( plotWidgetIdx ); delete legend; } + m_legends.removeAt( plotWidgetIdx ); QLabel* subTitle = m_subTitles[plotWidgetIdx]; subTitle->setParent( nullptr );