diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-05-11 14:06:27 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-05-11 14:06:27 +0000 |
commit | 6b7852c0eff01e7d224882aa5caf3a1677c13d20 (patch) | |
tree | 6e5cb2a2f1030898097abd769223bc797faf3922 /src/mtx_transpose.c | |
parent | c74f9041a42d95190b88990e91c2587f2f57a056 (diff) |
added safety checks whether the matrix is non-NULL
svn path=/trunk/externals/iem/iemmatrix/; revision=2948
Diffstat (limited to 'src/mtx_transpose.c')
-rw-r--r-- | src/mtx_transpose.c | 4 |
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; |