diff --git a/src/egl/main/egldevice.c b/src/egl/main/egldevice.c index d4cc3d995d8..f8b7e94de76 100644 --- a/src/egl/main/egldevice.c +++ b/src/egl/main/egldevice.c @@ -152,6 +152,9 @@ _eglAddDRMDevice(drmDevicePtr device) #endif /* Finds a device in DeviceList, for the given fd. + * + * The fd must be of a render-capable device, as there are only render-capable + * devices in DeviceList. * * If a software device, the fd is ignored. */ @@ -186,6 +189,9 @@ _eglFindDevice(int fd, bool software) } } + /* Couldn't find an EGLDevice for the device. */ + dev = NULL; + #else _eglLog(_EGL_FATAL, "Driver bug: Built without libdrm, yet looking for HW device");