From 207e065ffe894dacbdf7f84d998bd9192f160415 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 30 May 2024 13:59:12 +0200 Subject: [PATCH] Protect against empty program name. --- profiler/src/profiler/TracyUserData.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiler/src/profiler/TracyUserData.cpp b/profiler/src/profiler/TracyUserData.cpp index 87c6d5f0..71ba35a8 100644 --- a/profiler/src/profiler/TracyUserData.cpp +++ b/profiler/src/profiler/TracyUserData.cpp @@ -36,6 +36,8 @@ UserData::UserData( const char* program, uint64_t time ) : m_program( program ) , m_time( time ) { + if( m_program.empty() ) m_program = "_"; + FILE* f = OpenFile( FileDescription, false ); if( f ) { @@ -54,6 +56,8 @@ void UserData::Init( const char* program, uint64_t time ) assert( !Valid() ); m_program = program; m_time = time; + + if( m_program.empty() ) m_program = "_"; } bool UserData::SetDescription( const char* description )