aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-02-24 11:56:34 +0100
committerThomas White <taw@physics.org>2017-02-24 11:56:58 +0100
commit5280b7ae4c3439a9dfea9ef2af6ceeb2da0cb829 (patch)
treed67adcaef047ca8c2834142416b5a0f56e9748bd
parentb4df92e4983487fe4b9dc22fa893e9785cdebfe9 (diff)
get_hkl: Fix a segfault when there are no notes
-rw-r--r--src/get_hkl.c4
1 files changed, 3 insertions, 1 deletions
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));
+ }
}