Eo: add a check for future static classes.
authorTom Hacohen <tom@stosb.com>
Mon, 14 May 2012 15:20:46 +0000 (15:20 +0000)
committerTom Hacohen <tom@stosb.com>
Mon, 14 May 2012 15:20:46 +0000 (15:20 +0000)
SVN revision: 71078

legacy/eobj/lib/eo.c

index 10bbe27..89a2e23 100644 (file)
@@ -147,6 +147,10 @@ _dich_copy_all(Eo_Class *dst, const Eo_Class *src)
           {
              size_t j;
              const Eo_Class *op_klass = ID_CLASS_GET(i + 1);
+             /* Can be NULL because of future static classes. */
+             if (!op_klass)
+                continue;
+
              size_t num_ops = op_klass->desc->ops.count;
              _dich_chain_alloc(dc1, num_ops);