From 0ce14ba49cd6150e09a9dd32ea3451e3e47f16bf Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Jun 2012 12:20:11 +0200 Subject: More fussiness --- libcrystfel/src/reflist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libcrystfel/src/reflist.c') diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c index cea25bf3..64154774 100644 --- a/libcrystfel/src/reflist.c +++ b/libcrystfel/src/reflist.c @@ -900,6 +900,7 @@ struct _reflistiterator { **/ Reflection *first_refl(RefList *list, RefListIterator **piter) { + Reflection *refl; RefListIterator *iter; iter = malloc(sizeof(struct _reflistiterator)); @@ -908,7 +909,9 @@ Reflection *first_refl(RefList *list, RefListIterator **piter) iter->stack_ptr = 0; *piter = iter; - Reflection *refl = list->head; + if ( list == NULL ) return NULL; + + refl = list->head; do { -- cgit v1.2.3