mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
glcontext: Don't call get_instance_private (NULL)
ubsan does not like this.
See a9175e0c03
for a detailed explanation.
This commit is contained in:
parent
60ddf7c421
commit
a9dfec8478
@ -290,7 +290,7 @@ gdk_gl_context_create_egl_context (GdkGLContext *context,
|
||||
GdkDisplay *display = gdk_gl_context_get_display (context);
|
||||
EGLDisplay egl_display = gdk_display_get_egl_display (display);
|
||||
GdkGLContext *share = gdk_display_get_gl_context (display);
|
||||
GdkGLContextPrivate *share_priv = gdk_gl_context_get_instance_private (share);
|
||||
GdkGLContextPrivate *share_priv = share ? gdk_gl_context_get_instance_private (share) : NULL;
|
||||
EGLConfig egl_config;
|
||||
EGLContext ctx;
|
||||
EGLint context_attribs[N_EGL_ATTRS], i = 0, flags = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user