From de69fc98503dcf4a523ddefc2055a8f92181f3dc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 23 Nov 2020 22:48:55 +0100 Subject: [PATCH] Check if plot data values are finite numbers. --- server/TracyWorker.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 9bb8b3cb..39fe2f24 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -4942,6 +4942,16 @@ void Worker::ProcessLockName( const QueueLockName& ev ) void Worker::ProcessPlotData( const QueuePlotData& ev ) { + switch( ev.type ) + { + case PlotDataType::Double: + if( !isfinite( ev.data.d ) ) return; + break; + case PlotDataType::Float: + if( !isfinite( ev.data.f ) ) return; + break; + } + PlotData* plot = m_data.plots.Retrieve( ev.name, [this] ( uint64_t name ) { auto plot = m_slab.AllocInit(); plot->name = name;