From 85b8bc0cbf49e1dfbbce99a9645a7a817b35ae7e Mon Sep 17 00:00:00 2001 From: hasufell Date: Sat, 10 May 2014 23:38:25 +0200 Subject: [PATCH] Fix error handling in vector.c --- src/vector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vector.c b/src/vector.c index 7894a71..f7aa64c 100644 --- a/src/vector.c +++ b/src/vector.c @@ -47,7 +47,7 @@ bool vector_product(vector *a, vector *b, vector *c) vector a_tmp, b_tmp; - if (!a || !b) + if (!a || !b || !c) return false; copy_vector(a, &a_tmp); @@ -75,7 +75,7 @@ bool add_vectors(vector *a, vector *b, vector *c) vector a_tmp, b_tmp; - if (!a || !b) + if (!a || !b || !c) return false; copy_vector(a, &a_tmp); @@ -103,7 +103,7 @@ bool sub_vectors(vector *a, vector *b, vector *c) vector a_tmp, b_tmp; - if (!a || !b) + if (!a || !b || !c) return false; copy_vector(a, &a_tmp);