cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c0bcd3259189aa2f8d85b1cdd86b58d8ecfdaa25

commit c0bcd3259189aa2f8d85b1cdd86b58d8ecfdaa25
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Fri Apr 6 17:16:58 2018 -0700

    eina: allow EINA_VALUE_EMPTY to be propagated with eina_future_as_value.
---
 src/lib/eina/eina_promise.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index 5dac1c8443..3476a4b522 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -642,9 +642,9 @@ static Eina_Value
 _future_proxy(void *data, const Eina_Value v,
               const Eina_Future *dead_future EINA_UNUSED)
 {
-   Eina_Value copy;
+   Eina_Value copy = EINA_VALUE_EMPTY;
    //We're in a safe context (from mainloop), so we can avoid scheduling a new 
dispatch
-   if (!v.type) copy = v;
+   if (!v.type || !memcmp(&v, &copy, sizeof (Eina_Value))) copy = v;
    else if (!eina_value_copy(&v, &copy))
      {
         ERR("Value cannot be copied - unusable with Eina_Future: %p (%s)", 
v.type, v.type->name);

-- 


Reply via email to