Commit 3555e0f4 authored by Sam Lantinga's avatar Sam Lantinga

Fix a crash if an OpenGL video mode can't be set.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40230
parent 7db054c7
......@@ -615,11 +615,12 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
mode = video->SetVideoMode(this, prev_mode,video_w,video_h,video_bpp,flags);
if ( mode ) { /* Prevent resize events from mode change */
SDL_PrivateResize(mode->w, mode->h);
}
/* Sam - If we asked for an OpenGL mode, but didn't get it, fail */
/* Sam - If we asked for OpenGL mode, and didn't get it, fail */
if ( is_opengl && !(mode->flags & SDL_OPENGL) ) {
mode = NULL;
}
}
/*
* rcg11292000
* If you try to set an SDL_OPENGL surface, and fail to find a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment