Warp wrote in message <3a65ba93@news.povray.org>...
> I have run into one problem. I get a:
>
>error: Attempt to malloc zero size block (File: parse.c Line: 4385).
>
> Shouldn't it be enclosed in an if(number_of_uvcoords)?
> Will I break something if I add that condition?
probaly you should write something like
if (number_of_uvcoords>0)
{
Object->Data->UVCoords = (UV_VECT
*)POV_MALLOC(number_of_uvcoords*sizeof(UV_VECT), "triangle mesh data");
}
else
{
Object->Data->UVCoords = NULL;
}
and check all places where Object->Data->UVCoords is used
to avoid refferencing arrays at NULL pointer
for example at POV_FREE for this pointer
ABX
Post a reply to this message
|