From abd05f0ed76cc1148ab3899142dee5cb61314e6d Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 23 Jan 2019 12:32:01 +0300 Subject: [PATCH] [X11] Abort GLX context creation if GL_VERSION is null --- src/Avalonia.X11/Glx/GlxDisplay.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Avalonia.X11/Glx/GlxDisplay.cs b/src/Avalonia.X11/Glx/GlxDisplay.cs index a94f2ba625..7ca2136709 100644 --- a/src/Avalonia.X11/Glx/GlxDisplay.cs +++ b/src/Avalonia.X11/Glx/GlxDisplay.cs @@ -80,6 +80,8 @@ namespace Avalonia.X11.Glx ImmediateContext.MakeCurrent(); GlInterface = GlInterface.FromNativeUtf8GetProcAddress(p => GlxGetProcAddress(p)); + if (GlInterface.Version == null) + throw new OpenGlException("GL version string is null, aborting"); } public void ClearContext() => GlxMakeCurrent(_x11.Display, IntPtr.Zero, IntPtr.Zero);