do not operate if there is no callbacks (unsetting them).
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Apr 2010 15:56:06 +0000 (15:56 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Apr 2010 15:56:06 +0000 (15:56 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@47650 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_smart.c

index 4a56d3c..6556b14 100644 (file)
@@ -563,6 +563,8 @@ evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_
      count++;
 
    evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count);
+   if (count == 0) return 1;
+
    for (i = 0, d = descriptions; i < count; d++, i++)
      o->callbacks_descriptions.array[i] = d;