mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +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)
|
||||
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);
|
||||
|
||||
#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)
|
||||
{
|
||||
struct texture_image *img = (struct texture_image*)image_data;
|
||||
if (!img)
|
||||
return;
|
||||
|
||||
if (img->pixels)
|
||||
free(img->pixels);
|
||||
|
Loading…
x
Reference in New Issue
Block a user