Commits

Anonymous committed 4c149f8

#14, another sanity check (catched by Takeshi (tabe[at]fixedpoint[dot]jp))

Comments (0)

Files changed (1)

   if (i < head->size)
     {				/* cache still growing - add new elem */
       elem = (gdCache_element_t *) gdMalloc (sizeof (gdCache_element_t));
+			if (!elem)
+			 {
+				(*(head->gdCacheRelease)) (userdata);
+					return NULL;
+			 }
     }
   else
     {				/* cache full - replace least-recently-used */