mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(XMB) Some cleanups
This commit is contained in:
parent
affce9a7cf
commit
ca36923c99
@ -605,6 +605,9 @@ static GLuint xmb_png_texture_load_(const char * file_name)
|
|||||||
static int xmb_png_texture_load_wrap(void *data)
|
static int xmb_png_texture_load_wrap(void *data)
|
||||||
{
|
{
|
||||||
const char *filename = (const char*)data;
|
const char *filename = (const char*)data;
|
||||||
|
|
||||||
|
if (!filename)
|
||||||
|
return 0;
|
||||||
return xmb_png_texture_load_(filename);
|
return xmb_png_texture_load_(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,6 +617,10 @@ static GLuint xmb_png_texture_load(const char* file_name)
|
|||||||
&& !g_extern.system.hw_render_callback.context_type)
|
&& !g_extern.system.hw_render_callback.context_type)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)driver.video_data;
|
thread_video_t *thr = (thread_video_t*)driver.video_data;
|
||||||
|
|
||||||
|
if (!thr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
thr->cmd_data.custom_command.method = xmb_png_texture_load_wrap;
|
thr->cmd_data.custom_command.method = xmb_png_texture_load_wrap;
|
||||||
thr->cmd_data.custom_command.data = (void*)file_name;
|
thr->cmd_data.custom_command.data = (void*)file_name;
|
||||||
thr->send_cmd_func(thr, CMD_CUSTOM_COMMAND);
|
thr->send_cmd_func(thr, CMD_CUSTOM_COMMAND);
|
||||||
@ -1276,7 +1283,7 @@ static void xmb_free(void *data)
|
|||||||
{
|
{
|
||||||
menu_handle_t *menu = (menu_handle_t*)data;
|
menu_handle_t *menu = (menu_handle_t*)data;
|
||||||
|
|
||||||
if (menu->userdata)
|
if (menu && menu->userdata)
|
||||||
free(menu->userdata);
|
free(menu->userdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user