From 41d7e8e1f0ced5021674e599d13ccc0ea7f14b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 4 Sep 2015 20:04:31 +0200 Subject: [PATCH] GUI: Quick fix for a crash when mContextItem->parent() is NULL --- gui/resultstree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 9a4c878b1..7a4b76e6d 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -776,7 +776,7 @@ void ResultsTree::HideResult() void ResultsTree::HideAllIdResult() { - if (mContextItem) { + if (mContextItem && mContextItem->parent()) { // Make sure we are working with the first column if (mContextItem->column() != 0) mContextItem = mContextItem->parent()->child(mContextItem->row(), 0);