elementary/naviframe - fix null pointer access on naviframe item deletion.
authorChunEon Park <chuneon.park@samsung.com>
Thu, 25 Apr 2013 10:27:37 +0000 (19:27 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 27 May 2013 05:13:40 +0000 (14:13 +0900)
commit abdab0f1d2af96d445c54a4fcb4719f581f12012
Author: ChunEon Park <hermet>@hermet.pe.kr>
Date: Thu Apr 25 19:26:09 2013 +0900

Change-Id: Ia8513e72fe418db2f953b9b9eecc76d6b42f71a6

src/lib/elc_naviframe.c

index fe37776..08b7d3e 100644 (file)
@@ -465,15 +465,14 @@ _item_del_pre_hook(Elm_Object_Item *it)
         elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE);
      }
 
-   if (sd->stack->last->prev)
-     prev_it = EINA_INLIST_CONTAINER_GET
-         (sd->stack->last->prev, Elm_Naviframe_Item);
-
    sd->stack = eina_inlist_remove(sd->stack, EINA_INLIST_GET(nit));
    if (!sd->stack) elm_widget_resize_object_set(WIDGET(it), sd->dummy_edje);
 
    if (top && !sd->on_deletion) /* must raise another one */
      {
+        if (sd->stack && sd->stack->last)
+          prev_it = EINA_INLIST_CONTAINER_GET(sd->stack->last,
+                                              Elm_Naviframe_Item);
         if (!prev_it) goto end;
 
         if (sd->freeze_events)