From d99a224688d77803ad19d8720c1b8c6b2556136a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 11 Feb 2015 16:40:05 +0100 Subject: [PATCH] gl_load_texture_data - add early return if driver.video is NULL --- gfx/gl_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx/gl_common.c b/gfx/gl_common.c index 7471a56139..8da3d7c2d4 100644 --- a/gfx/gl_common.c +++ b/gfx/gl_common.c @@ -28,6 +28,9 @@ void gl_load_texture_data(GLuint id, bool want_mipmap = false; bool rgb32 = (base_size == (sizeof(uint32_t))); + if (!driver.video) + return; + glBindTexture(GL_TEXTURE_2D, id); wrap = driver.video->wrap_type_to_enum(wrap_type);