From 8614c945da0ff17487452ce24a34edc4482c3388 2018-01-10 13:44:07 From: mperrinel Date: 2018-01-10 13:44:07 Subject: [PATCH] Fix bug with null parent of selectedItem --- diff --git a/gui/src/Visualization/VisualizationSelectionZoneManager.cpp b/gui/src/Visualization/VisualizationSelectionZoneManager.cpp index ee679ce..1dc6b0d 100644 --- a/gui/src/Visualization/VisualizationSelectionZoneManager.cpp +++ b/gui/src/Visualization/VisualizationSelectionZoneManager.cpp @@ -39,7 +39,10 @@ void VisualizationSelectionZoneManager::clearSelection() { for (auto item : impl->m_SelectedItems) { item->setSelected(false); - item->parentPlot()->replot(QCustomPlot::rpQueuedReplot); + auto parentPlot = item->parentPlot(); + if (parentPlot) { + parentPlot->replot(QCustomPlot::rpQueuedReplot); + } } impl->m_SelectedItems.clear();