Proper message when call stack trees are not available.

This commit is contained in:
Bartosz Taudul 2019-09-21 00:56:56 +02:00
parent 46f7235e32
commit 7a1fb4e0bd

View File

@ -11889,6 +11889,7 @@ void View::DrawMemory()
ImGui::TreePop();
}
ImGui::Separator();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::TreeNode( ICON_FA_ALIGN_JUSTIFY " Bottom-up call stack tree" ) )
@ -11912,8 +11913,15 @@ void View::DrawMemory()
auto& mem = m_worker.GetMemData();
auto tree = GetCallstackFrameTreeBottomUp( mem );
int idx = 0;
DrawFrameTreeLevel( tree, idx );
if( !tree.empty() )
{
int idx = 0;
DrawFrameTreeLevel( tree, idx );
}
else
{
TextDisabledUnformatted( "No call stack data collected" );
}
ImGui::TreePop();
}
@ -11941,8 +11949,15 @@ void View::DrawMemory()
auto& mem = m_worker.GetMemData();
auto tree = GetCallstackFrameTreeTopDown( mem );
int idx = 0;
DrawFrameTreeLevel( tree, idx );
if( !tree.empty() )
{
int idx = 0;
DrawFrameTreeLevel( tree, idx );
}
else
{
TextDisabledUnformatted( "No call stack data collected" );
}
ImGui::TreePop();
}