alloc checks wooooooooooooo
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 5 Aug 2011 23:13:16 +0000 (23:13 +0000)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Mon, 24 Oct 2011 09:21:56 +0000 (18:21 +0900)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@62157 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_gesture_layer.c

index 76b00f5..157e5be 100644 (file)
@@ -3169,12 +3169,14 @@ elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Types idx,
       Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+   Gesture_Info *p;
    if (!wd) return;
 
    if (!wd->gesture[idx])
      wd->gesture[idx] = calloc(1, sizeof(Gesture_Info));
+   if (!wd->gesture[idx]) return;
 
-   Gesture_Info *p = wd->gesture[idx];
+   p = wd->gesture[idx];
    p->obj = obj;
    p->g_type = idx;
    p->fn[cb_type].cb = cb;