From 0bda4b1918830e87c2296b883c5e5c4e59548fe5 Mon Sep 17 00:00:00 2001 From: Ryuan Choi Date: Tue, 25 Jun 2013 08:11:48 +0900 Subject: [PATCH] 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. --- legacy/elementary/src/lib/elm_notify.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legacy/elementary/src/lib/elm_notify.c b/legacy/elementary/src/lib/elm_notify.c index f56d93ab82..a43d573ffd 100644 --- a/legacy/elementary/src/lib/elm_notify.c +++ b/legacy/elementary/src/lib/elm_notify.c @@ -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