Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Fixed a bug where bad access would occur if UIKIT_MakeCurrent is pass…

…ed NULL for the parameter 'SDL_GLContext context'. Instead, it clears the current context.
  • Loading branch information
Holmes Futrell committed Aug 13, 2008
1 parent bd9a055 commit 8daef597ec26d2bc14e25e3af7ce2ca9b068a932
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/video/uikit/SDL_uikitopengles.m
@@ -41,12 +41,20 @@
return SDL_LoadFunction(RTLD_DEFAULT, proc);

note that SDL_GL_Delete context makes it current without passing the window
int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)

SDL_WindowData *data = (SDL_WindowData *)window->driverdata;

[data->view setCurrentContext];
if (context) {
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
[data->view setCurrentContext];
else {
[EAGLContext setCurrentContext: nil];

return 0;

0 comments on commit 8daef59

Please sign in to comment.