Fix SegFault when FrameElements is empty

parent d2244215
Pipeline #21070 passed with stages
in 14 seconds
...@@ -175,7 +175,12 @@ void TimerCallback::Execute(vtkObject *caller, unsigned long eventId, ...@@ -175,7 +175,12 @@ void TimerCallback::Execute(vtkObject *caller, unsigned long eventId,
#endif #endif
extern_glyphs_pedestrians_3D->Update(); extern_glyphs_pedestrians_3D->Update();
} }
minFrame = frame->GetFrameElements()[0]->GetMinFrame(); auto FrameElements = frame->GetFrameElements();
if(FrameElements.size())
minFrame = frame->GetFrameElements()[0]->GetMinFrame();
else
minFrame = 0;
frameNumber += minFrame; frameNumber += minFrame;
if(SystemSettings::getShowTrajectories()) { if(SystemSettings::getShowTrajectories()) {
const std::vector<FrameElement *> &elements=frame->GetFrameElements(); const std::vector<FrameElement *> &elements=frame->GetFrameElements();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment