Surface.subsurface segfaults on a dead surface

Issue #2 resolved
Lenard Lindstrom created an issue

The Surface.subsurface method fails to check if the surface is alive. The result is a Pygame parachute.

{{{

import pygame s = pygame.Surface.new(pygame.Surface) ss = s.subsurface((0, 0, 0, 0)) Fatal Python error: (pygame parachute) Segmentation Fault Aborted }}}

Comments (7)

  1. Lenard Lindstrom reporter
    • changed status to new

    The problem: in surf_subsurface(), surf->format is assigned to format before surf is checked if NULL.

  2. Log in to comment