Don't crash when switching the call-stack direction.
authorMilian Wolff <milian.wolff@kdab.com>
Tue, 14 Jun 2016 15:20:29 +0000 (17:20 +0200)
committerMilian Wolff <milian.wolff@kdab.com>
Tue, 14 Jun 2016 15:20:29 +0000 (17:20 +0200)
gui/flamegraph.cpp

index 340f5e2..e0b410e 100644 (file)
@@ -489,7 +489,7 @@ void FlameGraph::showData()
 
 void FlameGraph::setDisplayText(const QString& text)
 {
-    if (text.isEmpty() && m_selectedItem != -1) {
+    if (text.isEmpty() && m_selectedItem != -1 && m_selectionHistory.at(m_selectedItem)) {
         m_displayLabel->setText(m_selectionHistory.at(m_selectedItem)->description());
         m_view->setCursor(Qt::ArrowCursor);
     } else {