eina: Eina_Future as Eina_Value can also be cancelled.

This commit is contained in:
Cedric BAIL 2018-05-05 21:04:20 -07:00
parent 2733277b2a
commit 90c2e05788
1 changed files with 2 additions and 0 deletions

View File

@ -643,6 +643,8 @@ _future_proxy(void *data, const Eina_Value v,
const Eina_Future *dead_future EINA_UNUSED)
{
Eina_Value copy = EINA_VALUE_EMPTY;
if (eina_value_type_get(&v) == EINA_VALUE_TYPE_ERROR) return v;
//We're in a safe context (from mainloop), so we can avoid scheduling a new dispatch
if (!v.type || !memcmp(&v, &copy, sizeof (Eina_Value))) copy = v;
else if (!eina_value_copy(&v, &copy))