From 920c6e69283f9bef5d3aa67776b868696e438c2d Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sun, 20 Dec 2020 11:55:20 -0500 Subject: [PATCH] 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?). --- VERSION | 2 +- base/netgen.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8740e51..5409a56 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.160 +1.5.161 diff --git a/base/netgen.c b/base/netgen.c index 2c9fc88..f2e3830 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -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); } }