Fix DRM/EGL segfault on some NVIDIA proprietary drivers (#5960)

This commit is contained in:
Nikita Dobrynin 2026-07-07 10:15:54 +00:00 • committed by GitHub
commit d159739a8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1445,7 +1445,8 @@ int InitPlatform(void)
return -1;
}
if (!eglChooseConfig(platform.device, NULL, NULL, 0, &numConfigs))
// Providing `framebufferAttribs` is not logically necessary, but it may prevent segfaults on some nvidia drivers
if (!eglChooseConfig(platform.device, framebufferAttribs, NULL, 0, &numConfigs))
{
TRACELOG(LOG_WARNING, "DISPLAY: Failed to get EGL config count: 0x%x", eglGetError());
return -1;
@ -2731,4 +2732,4 @@ static void SetupFramebuffer(int width, int height)
}
}
// EOF
// EOF