mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-11 01:10:32 +00:00
Always initialize display->gl_context on macOS
Otherwise SDL_GL_DeleteContext() tried to access an uninitialized pointer upon exit when not using the OpenGL renderer. SDL_GL_DeleteContext() doesn't try to delete a NULL pointer, so no need to check for that. Fixes #5057 <https://github.com/Genymobile/scrcpy/issues/5057> PR #5058 <https://github.com/Genymobile/scrcpy/pull/5058> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
b419eef55e
commit
46041e0cc0
@ -43,6 +43,10 @@ sc_display_init(struct sc_display *display, SDL_Window *window,
|
||||
|
||||
display->mipmaps = false;
|
||||
|
||||
#ifdef SC_DISPLAY_FORCE_OPENGL_CORE_PROFILE
|
||||
display->gl_context = NULL;
|
||||
#endif
|
||||
|
||||
// starts with "opengl"
|
||||
bool use_opengl = renderer_name && !strncmp(renderer_name, "opengl", 6);
|
||||
if (use_opengl) {
|
||||
|
Loading…
Reference in New Issue
Block a user