From 0c5c2b0368a09c5a249a492f24fe36fc05ac7319 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 4 Apr 2019 15:35:41 -0600 Subject: [PATCH] check if getPlatformExtensionName is null nativeDisplay.getPlatformExtensionName will be null if the platform does not support platform extensions. Check for that prior to turning it into a string. Components: GL, ANGLE build Affects: dEQP-GLES2.functional.rasterization.primitives.line* VK-GL-CTS issue: 1722 Change-Id: Ic60c3ad8387009b00bcb3ecd74d2d5cd673dade8 --- framework/egl/egluUtil.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/egl/egluUtil.cpp b/framework/egl/egluUtil.cpp index 13d7eba..82aeedc 100644 --- a/framework/egl/egluUtil.cpp +++ b/framework/egl/egluUtil.cpp @@ -250,6 +250,7 @@ EGLDisplay getDisplay (NativeDisplay& nativeDisplay) { const vector platformExts = eglu::getClientExtensions(egl); usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) && + nativeDisplay.getPlatformExtensionName() && de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName())); } @@ -327,6 +328,7 @@ EGLSurface createWindowSurface (NativeDisplay& nativeDisplay, NativeWindow& wind { const vector platformExts = eglu::getClientExtensions(egl); usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) && + nativeDisplay.getPlatformExtensionName() && de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName())); } @@ -384,6 +386,7 @@ EGLSurface createPixmapSurface (NativeDisplay& nativeDisplay, NativePixmap& pixm { const vector platformExts = eglu::getClientExtensions(egl); usePlatformExt = de::contains(platformExts.begin(), platformExts.end(), string("EGL_EXT_platform_base")) && + nativeDisplay.getPlatformExtensionName() && de::contains(platformExts.begin(), platformExts.end(), string(nativeDisplay.getPlatformExtensionName())); } -- 2.7.4