1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Handle case where color.nick is not set

Fixes a segfault if color.nick was never set but we want to print it's
value.
This commit is contained in:
Michael Vetter 2019-12-12 20:16:10 +01:00
parent e81eea284b
commit fd36fcdb1e

View File

@ -1973,6 +1973,11 @@ cons_color_setting(void)
{
char *color_pref = prefs_get_string(PREF_COLOR_NICK);
if (!color_pref) {
cons_show("Consistent color generation for nicks (/color) : OFF");
return;
}
if (strcmp(color_pref, "true") == 0) {
cons_show("Consistent color generation for nicks (/color) : ON");
} else if (strcmp(color_pref, "redgreen") == 0) {