Fixed crash setting 0 bpp video mode.
authorSam Lantinga <slouken@libsdl.org>
Wed, 15 Aug 2007 03:18:24 +0000
changeset 2240 eebaa05f8bd9
parent 2239 31835fd24b2b
child 2241 4932f192c565
Fixed crash setting 0 bpp video mode.
src/SDL_compat.c
--- a/src/SDL_compat.c	Mon Aug 13 06:24:56 2007 +0000
+++ b/src/SDL_compat.c	Wed Aug 15 03:18:24 2007 +0000
@@ -457,6 +457,7 @@
             } else {
                 desired_format = SDL_PIXELFORMAT_RGB888;
             }
+            bpp = SDL_BITSPERPIXEL(desired_format);
             break;
         case 8:
             desired_format = SDL_PIXELFORMAT_INDEX8;