Skip to content
Snippets Groups Projects
Commit e6cb4eb7 authored by Ulrich Kemloh's avatar Ulrich Kemloh
Browse files

fixed: memleak when the trajectories did not contain any frames

parent 94c86a17
No related branches found
No related tags found
No related merge requests found
...@@ -503,7 +503,10 @@ void ThreadVisualisation::initGlyphs2D() ...@@ -503,7 +503,10 @@ void ThreadVisualisation::initGlyphs2D()
//extern_glyphs_pedestrians->SetSourceConnection(agentShape->GetOutputPort()); //extern_glyphs_pedestrians->SetSourceConnection(agentShape->GetOutputPort());
//first frame //first frame
Frame * frame = extern_trajectories_firstSet.GetFrames().begin()->second; auto&& frames=extern_trajectories_firstSet.GetFrames();
if(frames.empty()) return;
Frame * frame = frames.begin()->second;
vtkPolyData* pData=NULL; vtkPolyData* pData=NULL;
if(frame) pData=frame->GetPolyData2D(); if(frame) pData=frame->GetPolyData2D();
...@@ -606,7 +609,11 @@ void ThreadVisualisation::initGlyphs3D() ...@@ -606,7 +609,11 @@ void ThreadVisualisation::initGlyphs3D()
extern_glyphs_pedestrians_3D->SetSourceConnection(strip->GetOutputPort()); extern_glyphs_pedestrians_3D->SetSourceConnection(strip->GetOutputPort());
//first frame //first frame
Frame * frame = extern_trajectories_firstSet.GetFrames().begin()->second; auto&& frames=extern_trajectories_firstSet.GetFrames();
if(frames.empty()) return;
Frame * frame = frames.begin()->second;
vtkPolyData* pData=NULL; vtkPolyData* pData=NULL;
if(frame) pData=frame->GetPolyData2D(); if(frame) pData=frame->GetPolyData2D();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment