naviframe: Check if item is valid in _tizen_effect_enabled_get() 12/109112/2 accepted/tizen_3.0.m2_common accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/common/20170110.181820 accepted/tizen/3.0.m2/mobile/20170110.084419 accepted/tizen/3.0.m2/tv/20170110.084440 accepted/tizen/3.0.m2/wearable/20170110.084500 submit/tizen_3.0.m2/20170109.075037
authorShilpa Singh <shilpa.singh@samsung.com>
Tue, 27 Dec 2016 16:00:45 +0000 (21:30 +0530)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 9 Jan 2017 07:36:44 +0000 (16:36 +0900)
Naviframe transition begins in deferred animator callback after item is
pushed or popped.

If an item is destructed and item destructor function is called before
deferred animator callback is called, then the item is NULL in deferred
animator callback and it caused crash due to the lack of NULL check.

Change-Id: I20d2a71d0fe604f108a8c9a1072fea4b302cd76c

src/lib/elc_naviframe.c

index 2d5d985..618508e 100644 (file)
@@ -81,6 +81,7 @@ _nf_mod_init(void)
 static Eina_Bool
 _tizen_effect_enabled_get(Elm_Naviframe_Item_Data *it)
 {
+   if (!it) return EINA_FALSE;
    if (nf_mod &&
        nf_mod->tizen_effect_enabled_get &&
        nf_mod->tizen_effect_enabled_get(VIEW(it)))