From 7da59a55cc7a7550dbe81c8514d37ee785715df6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 14 Nov 2017 23:37:20 +0100 Subject: [PATCH] Don't search for string in map, if it's known there's nothing there. --- server/TracyView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 69d421a1..f2499972 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1387,11 +1387,19 @@ const char* View::GetString( const StringRef& ref ) const { if( ref.isidx ) { + assert( ref.active ); return m_stringData[ref.stridx]; } else { - return GetString( ref.strptr ); + if( ref.active ) + { + return GetString( ref.strptr ); + } + else + { + return "???"; + } } }