More gracefully handle killed threads. Still needs some UI love.

This commit is contained in:
Ben Vanik 2015-12-29 15:19:31 -08:00
parent cc37fb1358
commit 077f73449d
2 changed files with 6 additions and 0 deletions

View File

@ -294,6 +294,9 @@ void Debugger::UpdateThreadExecutionStates(uint32_t override_handle,
for (auto& it : thread_execution_infos_) {
auto thread_info = it.second.get();
auto thread = thread_info->thread;
if (!thread) {
continue;
}
// Grab PPC context.
// Note that this is only up to date if --store_all_context_values is

View File

@ -995,6 +995,9 @@ void DebugWindow::DrawThreadsPane() {
auto thread = thread_info->thread;
bool is_current_thread = thread == state_.thread;
assert_not_null(thread); // TODO(benvanik): zombie thread states.
if (!thread) {
continue;
}
if (is_current_thread && state_.has_changed_thread) {
ImGui::SetScrollHere();
state_.has_changed_thread = false;