eo : Add null check
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 10 Apr 2018 04:38:21 +0000 (13:38 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 20 Apr 2018 11:38:15 +0000 (20:38 +0900)
Summary:
This commit add null check on __efl_auto_unref_set.
In EO_OBJ_POINTER, if obj_id is null, obj can also be null.

Test Plan: N/A

Reviewers: woohyun, kimcinoo, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5869

Change-Id: Ieb043953811655494fdcf0138465d3b273924e5a

src/lib/eo/eo_base_class.c

index fefc106..f340197 100644 (file)
@@ -2186,8 +2186,9 @@ EAPI void
 ___efl_auto_unref_set(Eo *obj_id, Eina_Bool enable)
 {
    // Write-only property
-   EO_OBJ_POINTER(obj_id, obj);
+   EO_OBJ_POINTER_RETURN(obj_id, obj);
    obj->auto_unref = enable ? 1 : 0;
+   EO_OBJ_DONE(obj_id);
 }
 
 EOLIAN static Eo *