mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
gdk: Fix a maybe-uninitialized warning
If there somehow end up being no `supported_versions`, `ctx` would end up being dereferenced before being initialised. While I think that’s unlikely, the compiler doesn’t know that, so let’s just initialise the variable unconditionally. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
d1bb1d091c
commit
680dba6524
@ -490,7 +490,7 @@ gdk_x11_context_create_glx_context (GdkGLContext *context,
|
||||
GdkGLContext *share = gdk_display_get_gl_context (display);
|
||||
GdkX11GLContextGLX *share_glx = NULL;
|
||||
GdkSurface *surface = gdk_gl_context_get_surface (context);
|
||||
GLXContext ctx;
|
||||
GLXContext ctx = NULL;
|
||||
int context_attribs[N_GLX_ATTRS], i = 0, flags = 0;
|
||||
gsize major_idx, minor_idx;
|
||||
GdkGLVersion version;
|
||||
|
Loading…
Reference in New Issue
Block a user