From d80dc82b96d1c78cc25452f5ab9cce90c1c5c89f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 28 Feb 2019 19:31:45 +0100 Subject: [PATCH] Don't display invalid thread in failure dialog. --- server/TracyView.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 6bbb6859..cec5cc1f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -633,9 +633,12 @@ bool View::Draw() ImGui::SameLine(); ImGui::Text( "%s:%i", s_instance->m_worker.GetString( srcloc.file ), srcloc.line ); } - TextFocused( "Thread:", s_instance->m_worker.GetThreadString( data.thread ) ); - ImGui::SameLine(); - ImGui::TextDisabled( "(0x%" PRIX64 ")", data.thread ); + if( data.thread != 0 ) + { + TextFocused( "Thread:", s_instance->m_worker.GetThreadString( data.thread ) ); + ImGui::SameLine(); + ImGui::TextDisabled( "(0x%" PRIX64 ")", data.thread ); + } ImGui::Separator(); if( ImGui::Button( "I understand" ) ) {