mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(PS3 image) Some more safety checks
(Driver) Safety check before invoking menu_context_destroy
This commit is contained in:
parent
30ce741f98
commit
8e04ac2f12
2
driver.c
2
driver.c
@ -635,7 +635,7 @@ void uninit_drivers(void)
|
|||||||
if (g_extern.system.hw_render_callback.context_destroy && !driver.video_cache_context)
|
if (g_extern.system.hw_render_callback.context_destroy && !driver.video_cache_context)
|
||||||
g_extern.system.hw_render_callback.context_destroy();
|
g_extern.system.hw_render_callback.context_destroy();
|
||||||
|
|
||||||
if (driver.menu_ctx && driver.menu_ctx->context_destroy)
|
if (driver.menu && driver.menu_ctx && driver.menu_ctx->context_destroy)
|
||||||
driver.menu_ctx->context_destroy(driver.menu);
|
driver.menu_ctx->context_destroy(driver.menu);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
|
@ -329,6 +329,8 @@ bool texture_image_load(void *data, const char *path, void *image_data)
|
|||||||
void texture_image_free(void *data, void *image_data)
|
void texture_image_free(void *data, void *image_data)
|
||||||
{
|
{
|
||||||
struct texture_image *img = (struct texture_image*)image_data;
|
struct texture_image *img = (struct texture_image*)image_data;
|
||||||
|
if (!img)
|
||||||
|
return;
|
||||||
|
|
||||||
if (img->pixels)
|
if (img->pixels)
|
||||||
free(img->pixels);
|
free(img->pixels);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user