diff options
Diffstat (limited to 'lib/object.c')
-rw-r--r-- | lib/object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/object.c b/lib/object.c index 9293df9..c3751a6 100644 --- a/lib/object.c +++ b/lib/object.c @@ -114,6 +114,9 @@ struct nl_object *nl_object_clone(struct nl_object *obj) int doff = offsetof(struct nl_derived_object, data); int size; + if (!obj) + return NULL; + new = nl_object_alloc(ops); if (!new) return NULL; |