From b30cd3e1b8d1162c529bfdd602d0d56ccd2e38c7 Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 20 May 2022 13:15:14 +0300 Subject: aha --- src/types.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/types.c') diff --git a/src/types.c b/src/types.c index 8918d98..9fbb59b 100644 --- a/src/types.c +++ b/src/types.c @@ -279,9 +279,12 @@ void copy_metadata(recipe * dst, recipe * src) { if (!dst || !src) return; - dst->filename = strdup(src->filename); - dst->path = strdup(src->path); - dst->title = strdup(src->title); + if (src->filename) + dst->filename = strdup(src->filename); + if (src->path) + dst->path = strdup(src->path); + if (src->title) + dst->title = strdup(src->title); } void -- cgit v1.2.3