Skip to content
Snippets Groups Projects
Commit d53bdaad authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't crash if step does not exists

parent ffcff162
No related branches found
No related tags found
No related merge requests found
...@@ -956,8 +956,10 @@ static void addVectorElement(PView *p, int ient, int iele, int numNodes, ...@@ -956,8 +956,10 @@ static void addVectorElement(PView *p, int ient, int iele, int numNodes,
opt->tmpMax = max; opt->tmpMax = max;
// add point trajectories // add point trajectories
// FIXME: this should be optional
if(!pre && numNodes == 1 && opt->timeStep > 0 && opt->lineWidth){ if(!pre && numNodes == 1 && opt->timeStep > 0 && opt->lineWidth){
for(int ts = 0; ts < opt->timeStep; ts++){ for(int ts = 0; ts < opt->timeStep; ts++){
if(!data->hasTimeStep(ts)) continue;
int numComp = data->getNumComponents(ts, ient, iele); int numComp = data->getNumComponents(ts, ient, iele);
double xyz0[3], dxyz[3][2] = {{0., 0.}, {0., 0.}, {0., 0.}}; double xyz0[3], dxyz[3][2] = {{0., 0.}, {0., 0.}, {0., 0.}};
data->getNode(ts, ient, iele, 0, xyz0[0], xyz0[1], xyz0[2]); data->getNode(ts, ient, iele, 0, xyz0[0], xyz0[1], xyz0[2]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment