src/video/windows/SDL_windowsframebuffer.c
changeset 9946 6f852b334192
parent 9619 b94b6d0bff0f
child 9998 f67cf37e9cd4
equal deleted inserted replaced
9945:09d546e9d8a1 9946:6f852b334192
    40     }
    40     }
    41 
    41 
    42     /* Find out the format of the screen */
    42     /* Find out the format of the screen */
    43     size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD);
    43     size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD);
    44     info = (LPBITMAPINFO)SDL_stack_alloc(Uint8, size);
    44     info = (LPBITMAPINFO)SDL_stack_alloc(Uint8, size);
       
    45     if (!info) {
       
    46         return SDL_OutOfMemory();
       
    47     }
    45 
    48 
    46     SDL_memset(info, 0, size);
    49     SDL_memset(info, 0, size);
    47     info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
    50     info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
    48 
    51 
    49     /* The second call to GetDIBits() fills in the bitfields */
    52     /* The second call to GetDIBits() fills in the bitfields */