aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_transpose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtx_transpose.c')
-rw-r--r--src/mtx_transpose.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mtx_transpose.c b/src/mtx_transpose.c
index 1fe2eab..ecc7722 100644
--- a/src/mtx_transpose.c
+++ b/src/mtx_transpose.c
@@ -18,7 +18,9 @@ static t_class *mtx_transpose_class;
t_matrixfloat*mtx_doTranspose(t_matrixfloat*transposee, int row, int col){
int r,c;
- t_matrixfloat*transposed=(t_matrixfloat*)getbytes(sizeof(t_matrixfloat)*row*col);
+ t_matrixfloat*transposed=0;
+ if(!transposee||!row||!col)return 0;
+ transposed=(t_matrixfloat*)getbytes(sizeof(t_matrixfloat)*row*col);
r=row;
while(r--){
c=col;