aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2006-08-09 20:00:28 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2006-08-09 20:00:28 +0000
commit118daf1842468f285add10669a09f2b5f8218591 (patch)
treea3446a3b46334dd9276a1b1e7165e302d2be2854
parent5fb8c47ff706b0df164de7b46ea1e4846a5dbf2f (diff)
bug corrected: the new "size" command was crashing with uninitialized matrix.
svn path=/trunk/externals/iem/iemmatrix/; revision=5541
-rw-r--r--src/mtx_matrix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mtx_matrix.c b/src/mtx_matrix.c
index 1df3db4..277b7ac 100644
--- a/src/mtx_matrix.c
+++ b/src/mtx_matrix.c
@@ -165,11 +165,12 @@ void matrix_set(t_matrix *x, t_float f)
void matrix_size(t_matrix *x, t_symbol *s, int argc, t_atom *argv)
{
- int col, row, size=x->row*x->col;
+ int col, row;
switch(argc) {
case 0: /* size */
- outlet_list(x->x_obj.ob_outlet, gensym("size"), 2, x->atombuffer);
+ if (x->row*x->col)
+ outlet_list(x->x_obj.ob_outlet, gensym("size"), 2, x->atombuffer);
break;
case 1:
row=atom_getfloat(argv);