BUG: blitting surfaces onto themselves in windows crashes


some pygame users have noticed that blitting surfaces onto themselves
now crashes in windows.

Blitting a surface onto itself used to work in an older version of SDL

  • and works on other platforms.

It crashes with both the directx, and windib drivers.

Here’s the code to reproduce with pygame… but it’d be a very short C
program too.

#import os
#os.environ[‘SDL_VIDEODRIVER’] = ‘directx’
#os.environ[‘SDL_VIDEODRIVER’] = ‘windib’

import pygame
screen = pygame.display.set_mode((320,200))
a = pygame.Surface((10, 10))
a.blit(a, (0, 0))