Set len.
[ruby-edje.git] / src / rb_edje.c
index f91fab5e4dc7763c6d67936c8685c5090a774167..700a4de6a8c3e64e895ed119ee4428c5002e6323 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_edje.c 333 2005-04-28 18:47:16Z tilman $
+ * $Id: rb_edje.c 334 2005-04-28 19:06:12Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -519,7 +519,8 @@ static VALUE c_send_message (VALUE self, VALUE msg)
        v = rb_iv_get (msg, "@value");
 
        type = get_msg_type (v);
-       ary = rb_check_array_type (v);
+       if (!NIL_P (ary = rb_check_array_type (v)))
+               len = RARRAY (ary)->len;
 
        switch (type) {
                case EDJE_MESSAGE_NONE: