Early exit on empty plots.

This commit is contained in:
Bartosz Taudul 2023-04-25 00:35:53 +02:00
parent 6aa9169901
commit 72b1ff6477
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -125,6 +125,7 @@ void TimelineItemPlot::Preprocess( const TimelineContext& ctx, TaskDispatch& td,
if( !visible ) return;
if( yPos > ctx.yMax ) return;
if( m_plot->data.empty() ) return;
const auto PlotHeight = int( round( PlotHeightPx * GetScale() ) );
if( yPos + PlotHeight < ctx.yMin ) return;