mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Do not crash when settings_get_str returns NULL.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4341 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b25c8cf1d1
commit
35574b10c4
@ -72,8 +72,14 @@ SV *
|
||||
settings_get_str(key)
|
||||
char *key
|
||||
CODE:
|
||||
RETVAL = newSVpv(settings_get_str(key), 0);
|
||||
const char *str;
|
||||
|
||||
RETVAL = NULL;
|
||||
str = settings_get_str(key);
|
||||
if (str != NULL) {
|
||||
RETVAL = newSVpv(str, 0);
|
||||
SvUTF8_on(RETVAL);
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user