From dbb91c85e6a7bdedfe0120d9284347e8bf591914 Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Mon, 31 Aug 2015 21:41:45 +0200 Subject: [PATCH] (Vita) Check vita->texture before freeing it --- gfx/drivers/vita2d_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index b4ad4b6952..c6f358a254 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -251,7 +251,8 @@ static void vita2d_gfx_free(void *data) if (vita->menu.frame) vita2d_free_texture(vita->menu.frame); - vita2d_free_texture(vita->texture); + if (vita->texture) + vita2d_free_texture(vita->texture); vita2d_fini(); }