• Sam Lantinga's avatar
    Couriersud fixed bug #603 · 4dd047e9
    Sam Lantinga authored
    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.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403174
    4dd047e9
Name
Last commit
Last update
..
audio Loading commit data...
cdrom Loading commit data...
cpuinfo Loading commit data...
events Loading commit data...
file Loading commit data...
haptic Loading commit data...
joystick Loading commit data...
loadso Loading commit data...
main Loading commit data...
stdlib Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
SDL.c Loading commit data...
SDL_compat.c Loading commit data...
SDL_error.c Loading commit data...
SDL_error_c.h Loading commit data...
SDL_fatal.c Loading commit data...
SDL_fatal.h Loading commit data...