diff --git a/gnu/usr.bin/perl/locale.c b/gnu/usr.bin/perl/locale.c index 92b6c1a6ec1..59c79b06c58 100644 --- a/gnu/usr.bin/perl/locale.c +++ b/gnu/usr.bin/perl/locale.c @@ -2858,7 +2858,7 @@ Perl_setlocale(const int category, const char * locale) /* If the new locale is the same as the current one, nothing is actually * being changed, so do nothing. */ - if ( strEQ(retval, locale) + if ( retval != NULL && strEQ(retval, locale) && ( ! affects_LC_NUMERIC(category) # ifdef USE_LOCALE_NUMERIC