From: cedric Date: Thu, 28 Apr 2011 13:24:18 +0000 (+0000) Subject: elementary: fix race condition in elm_thumb. X-Git-Tag: REL_F_I9200_20110722_1~8^2~50^2~413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f6584c7bbc4d8df7cf8606b85c350c0f085fa62;p=framework%2Fuifw%2Felementary.git elementary: fix race condition in elm_thumb. git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@59003 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c index 222e2cf..3b0c1de 100644 --- a/src/lib/elm_thumb.c +++ b/src/lib/elm_thumb.c @@ -88,8 +88,11 @@ _del_hook(Evas_Object *obj) #ifdef HAVE_ELEMENTARY_ETHUMB if (wd->thumb.id >= 0) - ethumb_client_generate_cancel(_elm_ethumb_client, wd->thumb.id, - NULL, NULL, NULL); + { + ethumb_client_generate_cancel(_elm_ethumb_client, wd->thumb.id, + NULL, NULL, NULL); + wd->thumb.id = -1; + } if (wd->thumb.exists) { ethumb_client_thumb_exists_cancel(wd->thumb.exists); @@ -255,6 +258,8 @@ _thumb_exists(Ethumb_Client *client __UNUSED__, Ethumb_Exists *thread, if (ethumb_client_thumb_exists_check(thread)) return ; + wd->thumb.exists = NULL; + if (exists) { const char *thumb_path, *thumb_key; @@ -300,7 +305,9 @@ _thumb_apply(Widget_Data *wd) if (!wd->file) return; ethumb_client_file_set(_elm_ethumb_client, wd->file, wd->key); - ethumb_client_thumb_exists(_elm_ethumb_client, _thumb_exists, wd); + wd->thumb.exists = ethumb_client_thumb_exists(_elm_ethumb_client, + _thumb_exists, + wd); } static Eina_Bool