From 4c0dd704d8fa51275d0b554ab5c4f05a1a562320 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 28 Apr 2022 23:04:55 +0200 Subject: [PATCH] There are situations in which inSym can be nullptr. Don't know exactly how to reproduce this. Nevertheless, the capture was produced in an usual way. This may be dependant on the exact client configuration. --- server/TracyView.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9af3a766..68a51e65 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -13764,20 +13764,22 @@ void View::DrawSamplesStatistics(Vector& data, int64_t timeRange, Accum if( !m_statSeparateInlines && hasNoSamples && v.symAddr != 0 && v.count > 0 ) { auto inSym = m_worker.GetInlineSymbolList( v.symAddr, symlen ); - assert( inSym != nullptr ); - const auto symEnd = v.symAddr + symlen; - while( *inSym < symEnd ) + if( inSym ) { - auto sit = inlineMap.find( *inSym ); - if( sit != inlineMap.end() ) + const auto symEnd = v.symAddr + symlen; + while( *inSym < symEnd ) { - if( sit->second.excl != 0 ) + auto sit = inlineMap.find( *inSym ); + if( sit != inlineMap.end() ) { - hasNoSamples = false; - break; + if( sit->second.excl != 0 ) + { + hasNoSamples = false; + break; + } } + inSym++; } - inSym++; } } if( hasNoSamples )