# HG changeset patch # User Emmanuel Gil Peyrot # Date 1324234289 -3600 # Node ID 5c3600e0f0cde4ec6e13547ed4b478ec0da4b15a # Parent 0595315d3880c212b3f935676888cfe94dfa3f88 Don’t try to render effect if there is no game. diff --git a/pytouhou/ui/gamerenderer.pyx b/pytouhou/ui/gamerenderer.pyx --- 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: