Skip to content

Commit

Permalink
Merge pull request #1230 from aufau/opengl-context-leak
Browse files Browse the repository at this point in the history
Fix opengl context leak on vid_restart
  • Loading branch information
Daggolin committed May 1, 2024
2 parents 2815211 + 3f4ca6b commit 7b9dfe7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion shared/sdl/sdl_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,17 @@ void WIN_Shutdown( void )

IN_Shutdown();

if ( opengl_context ) {
SDL_GL_DeleteContext( opengl_context );
opengl_context = NULL;
}

if ( screen ) {
SDL_DestroyWindow( screen );
screen = NULL;
}

SDL_QuitSubSystem( SDL_INIT_VIDEO );
screen = NULL;
}

void GLimp_EnableLogging( qboolean enable )
Expand Down

0 comments on commit 7b9dfe7

Please sign in to comment.