Skip to content
Permalink
Browse files

Don't crash if SDL_Flip() is called with an OpenGL mode set

  • Loading branch information
slouken committed Mar 9, 2006
1 parent 577bfba commit d764d1ef558d75f2e47710e35c8505b80d499380
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/video/SDL_video.c
@@ -1008,6 +1008,10 @@ void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects)
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;

0 comments on commit d764d1e

Please sign in to comment.