Fix for an error causing a segfault. This does not fix the
underlying issue (which needs to be investigated), but it does prevent netgen from crashing when it encounters it (netgen will generate an erro message instead).
This commit is contained in:
parent
3aeea9d164
commit
7cd8d82964
|
|
@ -5005,6 +5005,11 @@ int PropertyOptimize(struct objlist *ob, struct nlist *tp, int run, int series,
|
|||
// find ith record in ob
|
||||
p = 0;
|
||||
for (ob2 = ob; p != i; ob2 = ob2->next, p++);
|
||||
/* Sanity check */
|
||||
if (ob2->type != PROPERTY) {
|
||||
Fprintf(stderr, "Incorrect property run count!\n");
|
||||
continue;
|
||||
}
|
||||
// Count entries, add one, reallocate
|
||||
for (p = 0;; p++) {
|
||||
vl = &ob2->instance.props[p];
|
||||
|
|
|
|||
Loading…
Reference in New Issue