aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integer_matrix.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-08 15:40:32 +0200
committerThomas White <taw@physics.org>2019-08-16 10:26:59 +0200
commitdf354511a0f4a923827e45edcafcb51343d10ea8 (patch)
tree72afcfa3fcf4fe271407e87380af0d04c38409de /libcrystfel/src/integer_matrix.c
parent190bcee61bfd85df880d44e7dd69c2c898d0a27c (diff)
rtnl_mtx_print and intmat_print: Handle NULL matrix
Diffstat (limited to 'libcrystfel/src/integer_matrix.c')
-rw-r--r--libcrystfel/src/integer_matrix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c
index 1d1c3a47..9431d189 100644
--- a/libcrystfel/src/integer_matrix.c
+++ b/libcrystfel/src/integer_matrix.c
@@ -406,6 +406,11 @@ void intmat_print(const IntegerMatrix *m)
{
unsigned int i, j;
+ if ( m == NULL ) {
+ fprintf(stderr, "(NULL matrix)\n");
+ return;
+ }
+
for ( i=0; i<m->rows; i++ ) {
fprintf(stderr, "[ ");