From df2466c5ed70010cfd4e17026da7b26e82d275f6 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 26 Dec 2012 01:57:06 +0200 Subject: [PATCH] (Android) Fix crash on orientation update. --- gfx/context/androidegl_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index fcbdb2929f..1c5d27808e 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -84,9 +84,11 @@ static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) } } -static bool gfx_ctx_orientation_update(void) +static void gfx_ctx_orientation_update(void) { gl_t *gl = (gl_t*)driver.video_data; + if (!gl) + return; // Get real known video size, which might have been altered by context. gfx_ctx_get_video_size(&gl->win_width, &gl->win_height);