diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2010-08-09 09:22:00 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2010-08-09 09:22:00 +0000 |
commit | 909356819192da3239f24db42765f9debe00917e (patch) | |
tree | 42ef85a378bc842d37480c4683adcf8b19a860e3 | |
parent | 1a2f14568318fb059423e378f062b4b536825d86 (diff) |
allow to resize NULL-floatlists
trying to resize a NULL-floatlist, will create a new one with the required size
svn path=/trunk/externals/iem/iemnet/; revision=13776
-rw-r--r-- | iemnet_data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/iemnet_data.c b/iemnet_data.c index 72e0344..6012d75 100644 --- a/iemnet_data.c +++ b/iemnet_data.c @@ -64,6 +64,10 @@ t_iemnet_floatlist*iemnet__floatlist_create(unsigned int size) { t_iemnet_floatlist*iemnet__floatlist_resize(t_iemnet_floatlist*cl, unsigned int size) { t_atom*tmp; + if (NULL==cl) { + return iemnet__floatlist_create(size); + } + if(size<=cl->size) { cl->argc=size; return cl; |