changeset 221:5c3600e0f0cd

Don’t try to render effect if there is no game.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 18 Dec 2011 19:51:29 +0100
parents 0595315d3880
children 5cac48b328ad
files pytouhou/ui/gamerenderer.pyx
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/ui/gamerenderer.pyx
+++ b/pytouhou/ui/gamerenderer.pyx
@@ -105,7 +105,7 @@ cdef class GameRenderer:
         game = self.game
         texture_manager = self.texture_manager
 
-        if game.effect is not None:
+        if game is not None and game.effect is not None:
             glMatrixMode(GL_MODELVIEW)
             glLoadIdentity()
             # Some explanations on the magic constants: