Check if plot data values are finite numbers.

This commit is contained in:
Bartosz Taudul 2020-11-23 22:48:55 +01:00
parent d8cb536712
commit de69fc9850

View File

@ -4942,6 +4942,16 @@ void Worker::ProcessLockName( const QueueLockName& ev )
void Worker::ProcessPlotData( const QueuePlotData& 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 ) { PlotData* plot = m_data.plots.Retrieve( ev.name, [this] ( uint64_t name ) {
auto plot = m_slab.AllocInit<PlotData>(); auto plot = m_slab.AllocInit<PlotData>();
plot->name = name; plot->name = name;