Corrected a problem causing a segfault during a property record

copy if the property record does not have a model.class record
(should it always?).
This commit is contained in:
Tim Edwards 2020-12-20 11:55:20 -05:00
parent 69780aa048
commit 920c6e6928
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
1.5.160
1.5.161

View File

@ -2470,7 +2470,8 @@ void CopyProperties(struct objlist *obj_to, struct objlist *obj_from)
kvcur->value.ival = 0;
obj_to->instance.props = kvcopy;
obj_to->model.class = strsave(obj_from->model.class);
if (obj_from->model.class)
obj_to->model.class = strsave(obj_from->model.class);
}
}