summaryrefslogtreecommitdiffstats
path: root/src/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.c')
-rw-r--r--src/types.c9
1 files changed, 6 insertions, 3 deletions
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