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.
This commit is contained in:
Rene Gollent 2017-01-29 20:20:35 -05:00
parent 0d51483fae
commit 9a3409492a
1 changed files with 3 additions and 2 deletions

View File

@ -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;