mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(menu_hash) Prevent dereferences when settings is NULL
This commit is contained in:
parent
75b9a1312d
commit
69c82da160
@ -42,7 +42,8 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_INPUT_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -147,7 +148,8 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -224,7 +226,8 @@ int menu_hash_get_help_de(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
|
@ -126,7 +126,8 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_INPUT_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -239,7 +240,8 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -323,7 +325,8 @@ int menu_hash_get_help_es(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
|
@ -120,7 +120,8 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_INPUT_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -212,7 +213,8 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -290,7 +292,8 @@ int menu_hash_get_help_it(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
|
@ -43,7 +43,8 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_INPUT_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -136,7 +137,8 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -214,7 +216,8 @@ int menu_hash_get_help_pt(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
|
@ -111,7 +111,8 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_INPUT_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->input.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -203,7 +204,8 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->video.driver);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
@ -281,7 +283,8 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||
);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_RESAMPLER_DRIVER:
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
if (settings)
|
||||
driver_hash = msg_hash_calculate(settings->audio.resampler);
|
||||
|
||||
switch (driver_hash)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user