seoz pushed a commit to branch master.
commit 5231e153127fca9bf8998af4b4112813295d668f
Author: Daniel Juyung Seo <[email protected]>
Date: Wed May 29 21:05:09 2013 +0900
elm_photo.c: ELM_SAFE_FREE adoption.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as
recommended.
For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
---
src/lib/elm_photo.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c
index 1e55c05..e39caa9 100644
--- a/src/lib/elm_photo.c
+++ b/src/lib/elm_photo.c
@@ -137,7 +137,7 @@ _mouse_move(void *data,
if (move->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
{
/* Moved too far: No longpress for you! */
- ELM_FREE_FUNC(sd->long_press_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del);
evas_object_event_callback_del
(icon, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move);
}
@@ -192,7 +192,7 @@ _mouse_down(void *data,
if (ev->button != 1) return;
- ELM_FREE_FUNC(sd->long_press_timer, ecore_timer_del);
+ if (sd->long_press_timer) ecore_timer_del(sd->long_press_timer);
sd->long_press_timer = ecore_timer_add(_elm_config->longpress_timeout,
_long_press_cb, data);
evas_object_event_callback_add
@@ -211,7 +211,7 @@ _mouse_up(void *data,
if (ev->button != 1) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
- ELM_FREE_FUNC(sd->long_press_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del);
evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
}
@@ -300,7 +300,7 @@ _elm_photo_smart_del(Eo *obj, void *_pd, va_list *list
EINA_UNUSED)
{
Elm_Photo_Smart_Data * sd = _pd;
- ELM_FREE_FUNC(sd->long_press_timer, ecore_timer_del);
+ if (sd->long_press_timer) ecore_timer_del(sd->long_press_timer);
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
}
--
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1