From 1f0d8d3849ac0e160c81143c17a82ead1e00edb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 23 Nov 2025 10:14:10 +0100 Subject: [PATCH] core: add condition on new_tags in functions gui_buffer_set_highlight_tags_restrict and gui_buffer_set_highlight_tags --- src/gui/gui-buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 4a7580c9d..0a8cce95c 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -2177,7 +2177,7 @@ gui_buffer_set_highlight_tags_restrict (struct t_gui_buffer *buffer, } buffer->highlight_tags_restrict_count = 0; - if (!new_tags) + if (!new_tags || !new_tags[0]) return; buffer->highlight_tags_restrict = strdup (new_tags); @@ -2212,7 +2212,7 @@ gui_buffer_set_highlight_tags (struct t_gui_buffer *buffer, } buffer->highlight_tags_count = 0; - if (!new_tags) + if (!new_tags || !new_tags[0]) return; buffer->highlight_tags = strdup (new_tags);