Mercurial > touhou
changeset 453:17a7f3b028f3
Raise an exception if GL context creation fails instead of failing silently.
| author | Thibaut Girka <thib@sitedethib.com> |
|---|---|
| date | Fri, 30 Aug 2013 23:32:36 +0200 |
| parents | 1f5156093785 |
| children | a502887557ac |
| files | pytouhou/lib/sdl.pyx |
| diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pyx Fri Aug 30 20:38:02 2013 +0200 +++ b/pytouhou/lib/sdl.pyx Fri Aug 30 23:32:36 2013 +0200 @@ -58,6 +58,8 @@ def gl_create_context(self): self.context = SDL_GL_CreateContext(self.window) + if self.context == NULL: + raise SDLError(SDL_GetError()) def gl_swap_window(self): SDL_GL_SwapWindow(self.window)
