about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStefan <stefan@devlug.de>2021-02-14 21:00:05 +0100
committerStefan <stefan@devlug.de>2021-02-14 21:00:05 +0100
commit45e4d26296b72ecf4f491bf1f310cc09e831300c (patch)
tree096918a56e64ac4507383657b8452bf16971e405
parent79fbd403a7c1fdecc4e9062e3ae60cab7209da8e (diff)
downloadprofani-tty-45e4d26296b72ecf4f491bf1f310cc09e831300c.tar.gz
Bugfix: Titlebar show name without room name
Error log:
GLib-CRITICAL - g_string_insert_len: assertion 'len == 0 || val != NULL' failed

Check if a room name exists, before adding the name into the title bar.
-rw-r--r--src/ui/window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index cca6d902..8afb23f4 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -307,7 +307,7 @@ win_get_title(ProfWin* window)
         gboolean show_titlebar_name = prefs_get_boolean(PREF_TITLEBAR_MUC_TITLE_NAME);
         GString* title = g_string_new("");
 
-        if (show_titlebar_name) {
+        if (show_titlebar_name && mucwin->room_name) {
             g_string_append(title, mucwin->room_name);
             g_string_append(title, " ");
         }