toytoolkit: fix EGL surface creation for lazy drivers

Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.

Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/shared/platform.h b/shared/platform.h
index ff640b5..364ce5a 100644
--- a/shared/platform.h
+++ b/shared/platform.h
@@ -55,8 +55,9 @@
 {
 	const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
 
-	if (strstr(extensions, "EGL_EXT_platform_wayland")
-	    || strstr(extensions, "EGL_KHR_platform_wayland")) {
+	if (extensions
+	    && (strstr(extensions, "EGL_EXT_platform_wayland")
+	        || strstr(extensions, "EGL_KHR_platform_wayland"))) {
 		return (void *) eglGetProcAddress(address);
 	}