From 217a3781e6c2db2303b2bf7533a42a1077af6151 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 30 Aug 2019 00:59:54 +0200 Subject: [PATCH] Fix possible wrong process name for pid 0. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9da55a8b..5f1d51f4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -10668,7 +10668,7 @@ void View::DrawCpuDataWindow() const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true ); const auto expand = ImGui::TreeNode( pidtxt ); ImGui::NextColumn(); - ImGui::TextUnformatted( name ); + ImGui::TextUnformatted( pid.first == 0 ? "???" : name ); ImGui::NextColumn(); sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 ); ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );