From 0aa9e1af6d48b490906231192235f51232ed38f0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 14 Aug 2019 14:04:52 +0200 Subject: cell_print{_full}: Handle NULL cell --- libcrystfel/src/cell-utils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index 82b42b98..f6e189ad 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -213,6 +213,11 @@ void cell_print(UnitCell *cell) LatticeType lt; char cen; + if ( cell == NULL ) { + STATUS("(NULL cell)\n"); + return; + } + lt = cell_get_lattice_type(cell); cen = cell_get_centering(cell); @@ -253,8 +258,8 @@ void cell_print(UnitCell *cell) void cell_print_full(UnitCell *cell) { - cell_print(cell); + if ( cell == NULL ) return; if ( cell_has_parameters(cell) ) { -- cgit v1.2.3