From cba8afa2cadbb561f682ce3984d19ff398c69492 Mon Sep 17 00:00:00 2001 From: girvel Date: Tue, 7 Jul 2026 14:47:38 +0500 Subject: [PATCH] Fix DRM/EGL segfault on some NVIDIA proprietary drivers --- src/platforms/rcore_drm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index 659c80011..246addc00 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -1446,7 +1446,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; @@ -2732,4 +2733,4 @@ static void SetupFramebuffer(int width, int height) } } -// EOF \ No newline at end of file +// EOF