Assert cache->usage never becomes negative
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 13 Sep 2010 13:58:34 +0000 (13:58 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 13 Sep 2010 13:58:34 +0000 (13:58 +0000)
Assert cache->usage never becomes negative as was occurring before the
fix in r52149.

Just in time, the fix in r52149 was made by Ulisses, not me.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@52190 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/cache/evas_cache_image.c

index afdd943..65e309a 100644 (file)
@@ -1447,6 +1447,7 @@ EAPI int
 evas_cache_image_flush(Evas_Cache_Image *cache)
 {
    assert(cache);
+   assert(cache->usage >= 0);
 
    if (cache->limit == -1) return -1;