Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in X11_GL_GetVisual (Patch attached) #98

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Crash in X11_GL_GetVisual (Patch attached) #98

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2008-07-06 14:53:17 +0000, wrote:

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.

On 2008-07-06 14:56:11 +0000, wrote:

Created attachment 257
Patch to solve issue

On 2008-08-25 19:50:36 +0000, Sam Lantinga wrote:

Thanks!

Committed revision 4047.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant