From 3d3370b7253e7dfd6ee6a4c6e629e35dc002b674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Fri, 30 Jan 2015 04:41:08 +0100 Subject: [PATCH] (XMB) Fix a segfault during menu toggle --- settings_data.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/settings_data.c b/settings_data.c index c7cadff9e3..15a012f330 100644 --- a/settings_data.c +++ b/settings_data.c @@ -2902,7 +2902,7 @@ void setting_data_get_label(void *data, char *type_str, size_t type_str_size, unsigned *w, unsigned type, const char *menu_label, const char *label, unsigned idx) { - file_list_t *list = (file_list_t*)data; + file_list_t *list = (file_list_t*)data; rarch_setting_t *setting_data = NULL; rarch_setting_t *setting = NULL; @@ -2917,6 +2917,9 @@ void setting_data_get_label(void *data, char *type_str, label, idx)) == 0) return; + if (!label) + return; + #if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) if ((!strcmp(menu_label, "Shader Options") || !strcmp(menu_label, "video_shader_parameters") ||