(OSX) Fix some crashes that could occur

This commit is contained in:
Twinaphex 2016-09-03 23:27:38 +02:00
parent 459acfe47d
commit f5a4b402d7
2 changed files with 5 additions and 2 deletions

View File

@ -1956,7 +1956,7 @@ bool command_event(enum event_command cmd, void *data)
case CMD_EVENT_UNLOAD_CORE:
case CMD_EVENT_QUIT:
#ifdef HAVE_MENU
if (settings->confirm_on_exit)
if (settings && settings->confirm_on_exit)
{
if (menu_driver_ctl(RARCH_MENU_CTL_IS_QUIT_CONFIRM, NULL))
{

View File

@ -145,9 +145,12 @@ static void input_overlay_set_vertex_geom(input_overlay_t *ol)
void input_overlay_set_scale_factor(input_overlay_t *ol, float scale)
{
size_t i;
/* TODO/FIXME - Bad hackery. Should get rid of this */
if (!ol)
ol = overlay_ptr;
if (!ol)
return;
for (i = 0; i < ol->size; i++)
input_overlay_scale(&ol->overlays[i], scale);