diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c
index b7d2f25da8..c37dfe8819 100644
--- a/gfx/drivers/gl.c
+++ b/gfx/drivers/gl.c
@@ -1727,6 +1727,7 @@ static void *gl_init(const video_info_t *video,
    char *error_string                   = NULL;
    gl_t *gl                             = (gl_t*)calloc(1, sizeof(gl_t));
    const gfx_ctx_driver_t *ctx_driver   = gl_get_context(gl);
+
    if (!gl || !ctx_driver)
       goto error;
 
@@ -1782,6 +1783,9 @@ static void *gl_init(const video_info_t *video,
    RARCH_LOG("[GL]: Vendor: %s, Renderer: %s.\n", vendor, renderer);
    RARCH_LOG("[GL]: Version: %s.\n", version);
 
+   if (string_is_equal(ctx_driver->ident, "null"))
+      goto error;
+
    if (!string_is_empty(version))
       sscanf(version, "%d.%d", &gl->version_major, &gl->version_minor);
 
diff --git a/libretro-common/glsym/rglgen.c b/libretro-common/glsym/rglgen.c
index c87d85bfd7..a05d5445d9 100644
--- a/libretro-common/glsym/rglgen.c
+++ b/libretro-common/glsym/rglgen.c
@@ -38,5 +38,8 @@ void rglgen_resolve_symbols_custom(rglgen_proc_address_t proc,
 
 void rglgen_resolve_symbols(rglgen_proc_address_t proc)
 {
+   if (!proc)
+      return;
+
    rglgen_resolve_symbols_custom(proc, rglgen_symbol_map);
 }