From 8e2b40e9374b0bf1a98f6540a03f47f5f6323ba7 Mon Sep 17 00:00:00 2001 From: Rishikesh Kumar Rajak Date: Thu, 10 Jan 2019 06:58:12 -0800 Subject: [PATCH] If init_matrix fails, it will crash --- spmat/spmat_utils.upc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spmat/spmat_utils.upc b/spmat/spmat_utils.upc index f625bae..e05fe24 100644 --- a/spmat/spmat_utils.upc +++ b/spmat/spmat_utils.upc @@ -113,6 +113,8 @@ sparsemat_t * transpose_matrix(sparsemat_t *omat) { //A = transpose_matrix_exstack2(omat, 1024); //A = transpose_matrix_conveyor(omat); + if(!A) + exit(1); sort_nonzeros(A); return(A); }