From 1e51cabd7bf407917363d24fbe53c44ee0e925bc Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 Nov 2011 16:04:26 +0100 Subject: [PATCH] * grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is NULL. --- ChangeLog | 5 +++++ grub-core/gettext/gettext.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81f5d942d..ceca3fddb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-03 Vladimir Serbinenko + + * grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is + NULL. + 2011-11-03 crocket * util/grub.d/10_linux.in: Add Slackware initrd naming. diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c index cca8b901f..8581b1ff3 100644 --- a/grub-core/gettext/gettext.c +++ b/grub-core/gettext/gettext.c @@ -296,6 +296,9 @@ grub_gettext_init_ext (const char *locale) { char *locale_dir; + if (!locale) + return; + locale_dir = grub_env_get ("locale_dir"); if (locale_dir == NULL) { @@ -370,8 +373,6 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)), GRUB_MOD_INIT (gettext) { - (void) mod; /* To stop warning. */ - const char *lang; lang = grub_env_get ("lang");