ui.table: fix infinite loop when initializing calc data
authorYeongjong Lee <yj34.lee@samsung.com>
Thu, 7 Mar 2019 01:02:09 +0000 (01:02 +0000)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 14 Mar 2019 05:46:27 +0000 (14:46 +0900)
infinite loop if first cell is empty.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8170

src/lib/elementary/efl_ui_table_layout.c

index f017b33..26c288f 100644 (file)
@@ -152,6 +152,7 @@ _efl_ui_table_regular_cell_init(Table_Calc *table_calc, Eina_Bool axis)
    for (i = 0; i < count; i++)
      {
         if (!cell_calc[i].occupied) continue;
+        else if (i && cell_calc[0].next == 0) cell_calc[0].next = i;
 
         cell_calc[i].index = index++;
         want += cell_calc[i].space;