Evas: cache: missing guards
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 15 May 2011 10:11:22 +0000 (10:11 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 15 May 2011 10:11:22 +0000 (10:11 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59394 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/cache/evas_cache_image.c

index b8caaba..171aa24 100644 (file)
@@ -557,12 +557,14 @@ evas_cache_image_init(const Evas_Cache_Image_Func *cb)
 {
    Evas_Cache_Image *cache;
 
+#ifdef BUILD_ASYNC_PRELOAD
    if (_evas_cache_mutex_init++ == 0)
      {
         LKI(engine_lock);
         LKI(wakeup);
        eina_condition_new(&cond_wakeup, &wakeup);
      }
+#endif
 
    cache = calloc(1, sizeof(Evas_Cache_Image));
    if (!cache) return NULL;
@@ -657,12 +659,14 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
    eina_hash_free(cache->inactiv);
    free(cache);
 
+#ifdef BUILD_ASYNC_PRELOAD
    if (--_evas_cache_mutex_init == 0)
      {
        eina_condition_free(&cond_wakeup);
         LKD(engine_lock);
         LKD(wakeup);
      }
+#endif
 }
 
 EAPI Image_Entry *