[AD] System bitmap bug (fix)

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


Hello,

This patch (applied) fixes a crash bug related to user programs using system bitmaps on graphic drivers that don't support system bitmaps (namely, AllegroGL).

If create_system_bitmap() fails, it (according to the docs) should create a memory bitmap instead.


Index: src/graphics.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/graphics.c,v
retrieving revision 1.50
diff -u -r1.50 graphics.c
--- src/graphics.c	5 Apr 2003 08:34:52 -0000	1.50
+++ src/graphics.c	16 Jul 2003 07:02:15 -0000
@@ -1307,7 +1307,6 @@
       return gfx_driver->create_system_bitmap(width, height);

    bmp = create_bitmap(width, height);
-   bmp->id |= BMP_ID_SYSTEM;

    return bmp;
 }



--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/






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