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

fix crash

parent 621b20aa
No related branches found
No related tags found
No related merge requests found
...@@ -136,11 +136,11 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm) ...@@ -136,11 +136,11 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm)
for(int i = 0; i < 16; i++){ for(int i = 0; i < 16; i++){
if(fscanf(fp, "%lf", &tfo[i]) != 1) return; if(fscanf(fp, "%lf", &tfo[i]) != 1) return;
} }
if (completePer) s->setMeshMaster(m, tfo); if(completePer) s->setMeshMaster(m, tfo);
} }
else { else {
fsetpos(fp, &pos); fsetpos(fp, &pos);
s->setMeshMaster(m); if(completePer) s->setMeshMaster(m);
} }
int numv; int numv;
if(fscanf(fp, "%d", &numv) != 1) numv = 0; if(fscanf(fp, "%d", &numv) != 1) numv = 0;
...@@ -149,7 +149,7 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm) ...@@ -149,7 +149,7 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm)
if(fscanf(fp, "%d %d", &v1, &v2) != 2) continue; if(fscanf(fp, "%d %d", &v1, &v2) != 2) continue;
MVertex *mv1 = gm->getMeshVertexByTag(v1); MVertex *mv1 = gm->getMeshVertexByTag(v1);
MVertex *mv2 = gm->getMeshVertexByTag(v2); MVertex *mv2 = gm->getMeshVertexByTag(v2);
if (completePer) s->correspondingVertices[mv1] = mv2; if(completePer) s->correspondingVertices[mv1] = mv2;
} }
if (!completePer) { if (!completePer) {
if (!s) if (!s)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment