Mercurial > sdl-ios-xcode
view Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/SDLMain.nib/classes.nib @ 2723:911db724ea24
Couriersud fixed bug #603
Using the following sequence
SDL_Init(..:)
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)
SDL_DestroyWindow
SDL_CreateWindow(..., SDL_WINDOW_OPENGL)
SDL will crash in X11_GL_GetVisual. This is due to the fact that
during SDL_DestroyWindow X11_GL_Shutdown was called because the last window
has been closed.
On the next call to SDL_CreateWindow the library is still loaded and only the
memory is reinitialized. Function pointers such as gl_data->glXChooseVisual
will not be reinitialized.
Consequently, SDL will crash due to a NULL pointer access.
The attached patch corrects the behaviour.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 26 Aug 2008 02:47:26 +0000 |
parents | d63e9f5944ae |
children |
line wrap: on
line source
{ IBClasses = ( {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ACTIONS = {changeNumberOfSprites = id; selectUpdateMode = id; }; CLASS = MyController; LANGUAGE = ObjC; OUTLETS = {"_framesPerSecond" = id; "_numSprites" = id; "_view" = id; "_window" = id; }; SUPERCLASS = NSObject; }, {CLASS = MyCustomView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; }, {CLASS = MyCustomWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; }, { CLASS = SDLMain; LANGUAGE = ObjC; OUTLETS = {"_controller" = id; }; SUPERCLASS = NSObject; } ); IBVersion = 1; }