diff options
Diffstat (limited to 'src/perl/common/Settings.xs')
-rw-r--r-- | src/perl/common/Settings.xs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/perl/common/Settings.xs b/src/perl/common/Settings.xs index 624f1102..378e0c59 100644 --- a/src/perl/common/Settings.xs +++ b/src/perl/common/Settings.xs @@ -72,8 +72,14 @@ SV * settings_get_str(key) char *key CODE: - RETVAL = newSVpv(settings_get_str(key), 0); - SvUTF8_on(RETVAL); + const char *str; + + RETVAL = NULL; + str = settings_get_str(key); + if (str != NULL) { + RETVAL = newSVpv(str, 0); + SvUTF8_on(RETVAL); + } OUTPUT: RETVAL |