about summary refs log tree commit diff stats
path: root/src/muc.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-10-05 03:05:46 +0100
committerJames Booth <boothj5@gmail.com>2014-10-05 03:05:46 +0100
commit7584ddaa62033f876b78a4de8b32d8e1e90e0619 (patch)
tree4aec278429ca06f5b8a986cecf99badbc60b70a1 /src/muc.c
parent2026ab4b6ee7dca156b6b72d9889f2039279af27 (diff)
downloadprofani-tty-7584ddaa62033f876b78a4de8b32d8e1e90e0619.tar.gz
Added /room subject command
Diffstat (limited to 'src/muc.c')
-rw-r--r--src/muc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/muc.c b/src/muc.c
index effb1227..aa8148b1 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -232,7 +232,11 @@ muc_set_subject(const char * const room, const char * const subject)
     ChatRoom *chat_room = g_hash_table_lookup(rooms, room);
     if (chat_room) {
         free(chat_room->subject);
-        chat_room->subject = strdup(subject);
+        if (subject) {
+            chat_room->subject = strdup(subject);
+        } else {
+            chat_room->subject = NULL;
+        }
     }
 }