Bug 1751238 - Handle empty device extension strings in glxtest, r=gfx-reviewers,jgilbert

While the string should never be empty when the extension is actually
supported (which is checked above), there seem to be edge-cases where
that is the case.
Handle that gracefully.

Differential Revision: https://phabricator.services.mozilla.com/D136534
This commit is contained in:
Robert Mader 2022-01-20 22:45:22 +00:00
parent 1ab64170cd
commit 357b106665

View File

@ -541,7 +541,8 @@ static bool get_gles_status(EGLDisplay dpy,
EGL_TRUE) {
const char* deviceExtensions =
eglQueryDeviceStringEXT(device, EGL_EXTENSIONS);
if (strstr(deviceExtensions, "EGL_MESA_device_software")) {
if (deviceExtensions &&
strstr(deviceExtensions, "EGL_MESA_device_software")) {
record_value("MESA_ACCELERATED\nFALSE\n");
} else {
#ifdef MOZ_WAYLAND