Prevent null pointer dereference crash

This commit is contained in:
Twinaphex 2016-10-30 02:18:03 +02:00
parent 1a73b1d144
commit bd684065c3

View File

@ -2039,7 +2039,7 @@ bool command_event(enum event_command cmd, void *data)
if (audio_driver_alive())
return false;
if (!settings->audio.mute_enable && !audio_driver_start())
if (settings && !settings->audio.mute_enable && !audio_driver_start())
{
RARCH_ERR("%s\n",
msg_hash_to_str(MSG_FAILED_TO_START_AUDIO_DRIVER));