mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -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)
|
settings_get_str(key)
|
||||||
char *key
|
char *key
|
||||||
CODE:
|
CODE:
|
||||||
RETVAL = newSVpv(settings_get_str(key), 0);
|
const char *str;
|
||||||
SvUTF8_on(RETVAL);
|
|
||||||
|
RETVAL = NULL;
|
||||||
|
str = settings_get_str(key);
|
||||||
|
if (str != NULL) {
|
||||||
|
RETVAL = newSVpv(str, 0);
|
||||||
|
SvUTF8_on(RETVAL);
|
||||||
|
}
|
||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user