From 9a3409492a8d8e421ca3305b6f101b25756e9d34 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 29 Jan 2017 20:20:35 -0500 Subject: [PATCH] Debugger: Fix #13261. ThreadsTableModel: - When returning field values for the stop reason column, only return valid if we actually populated it with a value (ergo, the thread was actually stopped). Otherwise, the table will attempt to perform comparisons on a BVariant which was never actually populated, leading to crashes. --- .../user_interface/gui/team_window/ThreadListView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp b/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp index f8c84dc043..90b1f6b238 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp @@ -1,6 +1,6 @@ /* * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. - * Copyright 2011, Rene Gollent, rene@gollent.com. + * Copyright 2011-2017, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -128,8 +128,9 @@ public: if (thread->State() != THREAD_STATE_RUNNING) { value.SetTo(thread->StoppedReasonInfo(), B_VARIANT_DONT_COPY_DATA); + return true; } - return true; + return false; } default: return false;