Re: [AD] Zero sized bitmaps

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tuesday 23 August 2005 00:22, Matthew Leverton wrote:
> > if (height>0) {
> >   bitmap->line[0] = bitmap->dat;
> >   for (i=1; i<height; i++)
> >      bitmap->line[i] = bitmap->line[i-1] + width *
> >                        BYTES_PER_PIXEL(color_depth);
> > }
> > 
> 
> I created a patch from the above code and tested under MSVC 8. It no
> longer crashes when destroying 0x0 bitmaps. I don't care which route
> is taken, as long as any non NULL bitmap passed back to the user can
> be destroyed without a crash. :)

This looks like the correct fix to me.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/