eo2: support NULL op_descs
authorJérémy Zurcher <jeremy@asynk.ch>
Thu, 7 Nov 2013 23:51:00 +0000 (00:51 +0100)
committerTom Hacohen <tom@stosb.com>
Thu, 10 Apr 2014 03:20:19 +0000 (04:20 +0100)
src/lib/eo/eo.c

index 9688662..f5a77b6 100644 (file)
@@ -623,7 +623,8 @@ _eo2_class_funcs_set(_Eo_Class *klass)
    qsort((void*)op_descs, klass->desc->ops.count, sizeof(Eo2_Op_Description), eo2_api_funcs_cmp);
 
    op_id = klass->base_id;
-   DBG("Set functions for class '%s'", klass->desc->name);
+   DBG("Set functions for class '%s' %p", klass->desc->name, klass);
+   if (!op_descs) return;
    for (op_desc = op_descs; op_desc->op_type != EO_OP_TYPE_INVALID; op_desc++)
      {
         if(op_desc->api_func == NULL)