summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-03 14:01:04 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-03 15:45:36 +0900
commit0dc74232a1b7d582652528e471cebfd44c75d58e (patch)
tree1e9756d2f6e524ae9b1c0e4628cdb2a59ef0656b /src
parent183a611cde0ef889b82843a6f63583e04ba5ecc2 (diff)
edje signal cb - dont delete already deleted signals
let's assume you registered a callback twice with the same ptr data and same func and same sig/src... if you delete it once you're ok. delete twice... and you re-delete the first one (just makging it for delete_me). this fixes this corner case @fix
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_signal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/edje/edje_signal.c b/src/lib/edje/edje_signal.c
index 88c0f1d..12f22ef 100644
--- a/src/lib/edje/edje_signal.c
+++ b/src/lib/edje/edje_signal.c
@@ -316,7 +316,8 @@ _edje_signal_callback_disable(const Edje_Signal_Callback_Group *cgp,
316 if (sig == gp->matches->matches[i].signal && 316 if (sig == gp->matches->matches[i].signal &&
317 src == gp->matches->matches[i].source && 317 src == gp->matches->matches[i].source &&
318 func == gp->matches->matches[i].func && 318 func == gp->matches->matches[i].func &&
319 gp->custom_data[i] == data) 319 gp->custom_data[i] == data &&
320 !gp->flags[i].delete_me)
320 { 321 {
321 gp->flags[i].delete_me = EINA_TRUE; 322 gp->flags[i].delete_me = EINA_TRUE;
322 return gp->custom_data[i]; 323 return gp->custom_data[i];
@@ -329,7 +330,8 @@ _edje_signal_callback_disable(const Edje_Signal_Callback_Group *cgp,
329 { 330 {
330 if (sig == gp->matches->matches[i].signal && 331 if (sig == gp->matches->matches[i].signal &&
331 src == gp->matches->matches[i].source && 332 src == gp->matches->matches[i].source &&
332 func == gp->matches->matches[i].func) 333 func == gp->matches->matches[i].func &&
334 !gp->flags[i].delete_me)
333 { 335 {
334 gp->flags[i].delete_me = EINA_TRUE; 336 gp->flags[i].delete_me = EINA_TRUE;
335 return gp->custom_data[i]; 337 return gp->custom_data[i];