Re: [AD] Problem with remove_mouse() and video bitmaps. |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
True, but shouldn't the screen always be valid (while there is a gfx modeset)? I think that the problem was with video bitmaps, which the above code would cover.Yes, "screen" was just an example for any bitmap (the mouse might be drawn to). What we are saying is, you simply can't set the bitmap to NULL, without some extra construction to keep track of all active bitmap pointers.
I don't see why this should be a problem. Especially since the documentation doesn't state that destroy_bitmap() won't change the pointer it's given.
That the solution is not robust (and can't be robust without any extra construction) is a given, but I'd say it is better than the current situation (it would at least stop some random crashes).
@Peter:
Set _which_ pointer to NULL?
void destroy_bitmap(BITMAP *bitmap) { /* ... */ bitmap = NULL; } That one.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |