# HG changeset patch # User Sam Lantinga # Date 1141920754 0 # Node ID cf23b92602aad84d71da04610c9506faec91650e # Parent 8f3e602904d1c3a17be54224a64bee3b294366cc Don't crash if SDL_Flip() is called with an OpenGL mode set diff -r 8f3e602904d1 -r cf23b92602aa src/video/SDL_video.c --- a/src/video/SDL_video.c Thu Mar 09 15:11:15 2006 +0000 +++ b/src/video/SDL_video.c Thu Mar 09 16:12:34 2006 +0000 @@ -1008,6 +1008,10 @@ SDL_VideoDevice *video = current_video; SDL_VideoDevice *this = current_video; + if ( (screen->flags & (SDL_OPENGL | SDL_OPENGLBLIT)) == SDL_OPENGL ) { + SDL_SetError("OpenGL active, use SDL_GL_SwapBuffers()"); + return; + } if ( screen == SDL_ShadowSurface ) { /* Blit the shadow surface using saved mapping */ SDL_Palette *pal = screen->format->palette;