fix ... negative calloc... hrrrm

SVN revision: 46696
This commit is contained in:
Carsten Haitzler 2010-03-01 14:37:37 +00:00
parent 8bd17b0d1d
commit 2f1ffe9863
1 changed files with 5 additions and 1 deletions

View File

@ -1092,7 +1092,11 @@ eng_image_colorspace_set(void *data, void *image, int cspace)
{
if (!im->cs.no_free) free(im->cs.data);
}
im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2);
if (im->im->cache_entry.h > 0)
im->cs.data =
calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2);
else
im->cs.data = NULL;
im->cs.no_free = 0;
break;
default: