aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-06-21 12:20:11 +0200
committerThomas White <taw@physics.org>2012-06-21 12:20:11 +0200
commit0ce14ba49cd6150e09a9dd32ea3451e3e47f16bf (patch)
tree3cf05a908578cc2f4eddacc4bc805d3cdd966c1b /libcrystfel/src/reflist.c
parenteedb9e2a4a4305e89344453ff890c3b2a844b2ee (diff)
More fussiness
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r--libcrystfel/src/reflist.c5
1 files changed, 4 insertions, 1 deletions
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 {