fix evas compilation when async preload is disabled
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 7 Nov 2009 18:19:44 +0000 (18:19 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 7 Nov 2009 18:19:44 +0000 (18:19 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@43514 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/cache/evas_cache_image.c

index 9959b2a..66cb466 100644 (file)
@@ -937,24 +937,27 @@ evas_cache_image_drop(Image_Entry *im)
    im->references--;
    cache = im->cache;
 
-   if (im->references == 0 && !im->flags.pending)
+   if (im->references == 0)
      {
 #ifdef BUILD_ASYNC_PRELOAD
-       pthread_mutex_lock(&mutex);
-        if (im->flags.preload || im->flags.in_pipe)
-          {
-             pthread_mutex_unlock(&mutex);
-             _evas_cache_image_entry_preload_remove(im, NULL);
-             pthread_mutex_lock(&mutex_pending);
-             if (!im->flags.pending)
-               {
-                  im->flags.pending = 1;
-                  pending = eina_list_append(pending, im);
-               }
-             pthread_mutex_unlock(&mutex_pending);
-             return;
-          }
-       pthread_mutex_unlock(&mutex);
+       if (!im->flags.pending)
+         {
+            pthread_mutex_lock(&mutex);
+            if (im->flags.preload || im->flags.in_pipe)
+              {
+                 pthread_mutex_unlock(&mutex);
+                 _evas_cache_image_entry_preload_remove(im, NULL);
+                 pthread_mutex_lock(&mutex_pending);
+                 if (!im->flags.pending)
+                   {
+                      im->flags.pending = 1;
+                      pending = eina_list_append(pending, im);
+                   }
+                 pthread_mutex_unlock(&mutex_pending);
+                 return;
+              }
+            pthread_mutex_unlock(&mutex);
+         }
 #endif
 
        if (im->flags.dirty)