elm_calendar: Do not pass NULL to function.
authorWoochanlee <wc0917.lee@samsung.com>
Thu, 11 Jun 2020 07:34:16 +0000 (16:34 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 11 Jun 2020 21:51:50 +0000 (06:51 +0900)
Summary:
T7076

legacy calendar inc/dec button has auto repeat feature.
for that if user click the button very quickly, we delete internal timer than it will pass to function.

to prevent this, need to check NULL pointer.

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

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

src/lib/elementary/elm_calendar.c

index e063376..9197529 100644 (file)
@@ -1237,8 +1237,11 @@ _spin_value(void *data)
    if (_update_data(data, sd->month_btn_clicked, sd->spin_speed))
      evas_object_smart_changed(data);
 
-   sd->interval = sd->interval / 1.05;
-   ecore_timer_interval_set(sd->spin_timer, sd->interval);
+   if (sd->spin_timer)
+     {
+        sd->interval = sd->interval / 1.05;
+        ecore_timer_interval_set(sd->spin_timer, sd->interval);
+     }
 
    return ECORE_CALLBACK_RENEW;
 }