From 5280b7ae4c3439a9dfea9ef2af6ceeb2da0cb829 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 24 Feb 2017 11:56:34 +0100 Subject: get_hkl: Fix a segfault when there are no notes --- src/get_hkl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/get_hkl.c') diff --git a/src/get_hkl.c b/src/get_hkl.c index d6efe747..77f34da2 100644 --- a/src/get_hkl.c +++ b/src/get_hkl.c @@ -98,7 +98,9 @@ static void show_help(const char *s) static void copy_notes(RefList *out, RefList *in) { - reflist_add_notes(out, reflist_get_notes(in)); + if ( reflist_get_notes(in) != NULL ) { + reflist_add_notes(out, reflist_get_notes(in)); + } } -- cgit v1.2.3