Fix error handling in vector.c

This commit is contained in:
hasufell 2014-05-10 23:38:25 +02:00
parent accf11ba6c
commit 85b8bc0cbf
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 3 additions and 3 deletions

View File

@ -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);