projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47e9d11
)
ecore: prevent crash in case of double ecore_timer_del in legacy case.
author
Cedric Bail
<cedric@osg.samsung.com>
Wed, 15 Jun 2016 17:45:40 +0000
(10:45 -0700)
committer
Cedric Bail
<cedric@osg.samsung.com>
Wed, 15 Jun 2016 17:54:09 +0000
(10:54 -0700)
src/lib/ecore/ecore_timer.c
patch
|
blob
|
history
diff --git
a/src/lib/ecore/ecore_timer.c
b/src/lib/ecore/ecore_timer.c
index
a01d810
..
b7fce54
100644
(file)
--- a/
src/lib/ecore/ecore_timer.c
+++ b/
src/lib/ecore/ecore_timer.c
@@
-235,6
+235,15
@@
ecore_timer_del(Ecore_Timer *timer)
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
legacy = eo_key_data_get(timer, "_legacy");
+ // If legacy == NULL, this means double free or something
+ if (legacy == NULL)
+ {
+ // Just in case it is an Eo timer, but not a legacy one.
+ ERR("You are trying to destroy a timer which seems dead already.");
+ eo_unref(timer);
+ return NULL;
+ }
+
data = (void*) legacy->data;
if (legacy->inside_call)