Commits

Anonymous committed d8b2e71

Ignore error if default icon not found.

  • Participants
  • Parent commits 97c874f
  • Branches ctypes-soc

Comments (0)

Files changed (2)

  - Fixed unset colorkey with Surface.set_colorkey
  - Performance of simple (non error-checking) SDL/pygame functions improved
  - Software blitting BGR surfaces corrected.
+ - Ignore error if default icon not found.
 
 Pygame-ctypes 0.09
 ------------------

File pygame/display.py

 
     if sys.platform != 'darwin':
         if not _icon_was_set:
-            file = pygame.pkgdata.getResource(_icon_defaultname)
-            iconsurf = pygame.image.load(file)
-            SDL_SetColorKey(iconsurf._surf, SDL_SRCCOLORKEY, 0)
-            set_icon(iconsurf)
+            try:	
+                file = pygame.pkgdata.getResource(_icon_defaultname)
+                iconsurf = pygame.image.load(file)
+                SDL_SetColorKey(iconsurf._surf, SDL_SRCCOLORKEY, 0)
+                set_icon(iconsurf)
+            except IOError:
+                # Not worth dying over.
+                pass
 
     return _display_surface