From d53bdaadd2379b4bf8e0d67b6bbb167e2c54dae1 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 24 May 2013 17:20:45 +0000 Subject: [PATCH] don't crash if step does not exists --- Post/PViewVertexArrays.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Post/PViewVertexArrays.cpp b/Post/PViewVertexArrays.cpp index 1358ead311..79bd29f0aa 100644 --- a/Post/PViewVertexArrays.cpp +++ b/Post/PViewVertexArrays.cpp @@ -956,8 +956,10 @@ static void addVectorElement(PView *p, int ient, int iele, int numNodes, opt->tmpMax = max; // add point trajectories + // FIXME: this should be optional if(!pre && numNodes == 1 && opt->timeStep > 0 && opt->lineWidth){ for(int ts = 0; ts < opt->timeStep; ts++){ + if(!data->hasTimeStep(ts)) continue; int numComp = data->getNumComponents(ts, ient, iele); double xyz0[3], dxyz[3][2] = {{0., 0.}, {0., 0.}, {0., 0.}}; data->getNode(ts, ient, iele, 0, xyz0[0], xyz0[1], xyz0[2]); -- GitLab