From daa7d9439cf1c1d6dbd6330908cd275d4c0ac9ad Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 16 Feb 2021 10:59:47 +0100 Subject: [PATCH] vrend: check if we got a version string Otherwise the code will simply crash, we should give it a chance to exit cleanly. Signed-off-by: Gert Wollny Reviewed-by: Rohan Garg --- src/vrend_renderer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 6bbbba9..0a00791 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6064,6 +6064,8 @@ static bool use_integer() { return true; const char * a = (const char *) glGetString(GL_VENDOR); + if (!a) + return false; if (strcmp(a, "ARM") == 0) return true; return false;