Re: [AD] Problem with remove_mouse() and video bitmaps.

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


Stef wrote:

On Fri, 30 Dec 2005 10:24:44 +0200, Peter Wang <tjaden@xxxxxxxxxx> wrote:

+ Note: you must not be showing a mouse pointer on a bitmap at the time that + the bitmap is destroyed with destroy_bitmap(). This does not apply to
+   `screen' since you never destroy `screen' with destroy_bitmap().


If the destroy_bitmap() function automatically nulled out the bitmap pointer, it would be trivial to add a check to avoid drawing onto an invalid bitmap. While this wouldn't be the end of this kind of problems, it would help allegro become more robust. It wouldn't break compatibility either (though programs using an old dll would be more crash prone).

Is there an obvious reason against this that I missed? (very probable). Otherwise, I think I could submit a patch for this one if the following days.


explain how that would work ?




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