Commit e8682721 authored by piggz's avatar piggz

[lipstick] Fix crash on non-hybris (ie native) implementations

eglQueryString can return NULL (see
and on systems like the Xiaomi Latte which uses mesa/i915 this is the

Fixes mer #2031
parent da781e1d
......@@ -17,9 +17,17 @@
#include <QGlobalStatic>
const char* checked_strstr(const char *haystack, const char *needle)
if (!haystack || !needle) {
return 0;
return strstr(haystack, needle);
struct SupportedEglHybrisFunctions : public EglHybrisFunctions
const bool supported = strstr(eglQueryString(eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_EXTENSIONS), "EGL_HYBRIS_native_buffer2") != 0
const bool supported = checked_strstr(eglQueryString(eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_EXTENSIONS), "EGL_HYBRIS_native_buffer2") != 0
&& glEGLImageTargetTexture2DOES
&& eglCreateImageKHR
&& eglDestroyImageKHR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment