summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/curses/gui-display.c3
-rw-r--r--weechat/src/gui/curses/gui-display.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index 8eafbac6a..cf86fe86c 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -2439,6 +2439,9 @@ gui_printf_type_color (t_gui_buffer *buffer, int type, int color, char *message,
vsnprintf (buf, sizeof (buf) - 1, message, argptr);
va_end (argptr);
+ if (!buf[0])
+ return;
+
if (cfg_look_remove_colors_from_msgs)
{
buf2 = (char *) malloc (strlen (buf) + 2);
diff --git a/weechat/src/gui/curses/gui-display.c b/weechat/src/gui/curses/gui-display.c
index 8eafbac6a..cf86fe86c 100644
--- a/weechat/src/gui/curses/gui-display.c
+++ b/weechat/src/gui/curses/gui-display.c
@@ -2439,6 +2439,9 @@ gui_printf_type_color (t_gui_buffer *buffer, int type, int color, char *message,
vsnprintf (buf, sizeof (buf) - 1, message, argptr);
va_end (argptr);
+ if (!buf[0])
+ return;
+
if (cfg_look_remove_colors_from_msgs)
{
buf2 = (char *) malloc (strlen (buf) + 2);