[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame Parachute, Dead Surface, Surface.subsurface(...), and Copying Surfaces



Hi,

My solution is:

if isinstance(data,pygame.Surface):
    self.data = "">  else:
    self.data = "">
On Fri, Aug 12, 2011 at 10:40 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I am still partly asleep. I will file a bug report on Surface.subsurface failing to check if the surface is alive.

>>> import pygame
>>> s = pygame.Surface.__new__(pygame.Surface)
>>> ss = s.subsurface((0, 0, 0, 0))
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted
Thanks.  Though, why not make it so that the instant a surface dies, it throws an exception?  That would have been most helpful.
 
Lenard
Ian