forked from enlightenment/efl
elm_notify: Fix crash when timeout is zero
Because _timer_init() can be called multiple times, sd->timer should be cleard if we will not add new timer This fixes https://phab.enlightenment.org/T178 Thanks brian.lovin for the report.
This commit is contained in:
parent
fec9eab52c
commit
0bda4b1918
|
@ -262,6 +262,8 @@ _timer_init(Evas_Object *obj,
|
|||
if (sd->timer) ecore_timer_del(sd->timer);
|
||||
if (sd->timeout > 0.0)
|
||||
sd->timer = ecore_timer_add(sd->timeout, _timer_cb, obj);
|
||||
else
|
||||
sd->timer = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue