elm_genlist: do not check scroll if show_item is NULL 09/113509/2
authorMinkyu Kang <mk7.kang@samsung.com>
Tue, 7 Feb 2017 23:00:35 +0000 (15:00 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 24 Feb 2017 07:49:10 +0000 (23:49 -0800)
Summary:
If show_item is NULL then does not need to check scroll.
But, sometimes show_item is NULL but check_scroll is true.
It was wrong and can makes a crash.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewers: cedric, Hermet, SanghyeonLee, raster

Subscribers: jpeg

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

Change-Id: If4ed681fc14b7b8535eb065c7ee81aea251e80eb
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elm_genlist.c

index dae68088650d61c897699e1cead35412c61dd9f9..4238162d334530642ff2fe33a547bafe29a26ac0 100644 (file)
@@ -866,6 +866,7 @@ _calc_job(void *data)
         if (!sd->must_recalc_idler)
           sd->must_recalc_idler = ecore_idler_add(_must_recalc_idler, data);
      }
+   if (!sd->show_item) sd->check_scroll = EINA_FALSE;
    if (sd->check_scroll)
      {
         eo_do(sd->pan_obj, elm_obj_pan_content_size_get(&pan_w, &pan_h));