about summary refs log tree commit diff stats
path: root/src/event/server_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/server_events.c')
-rw-r--r--src/event/server_events.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index c823e164..d1e8380b 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -646,8 +646,9 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
     // joined room
     if (!occupant) {
         char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
-        if (g_strcmp0(muc_status_pref, "none") != 0) {
-            mucwin_occupant_online(room, nick, role, affiliation, show, status);
+        ProfMucWin *mucwin = wins_get_muc(room);
+        if (mucwin && g_strcmp0(muc_status_pref, "none") != 0) {
+            mucwin_occupant_online(mucwin, nick, role, affiliation, show, status);
         }
         prefs_free_string(muc_status_pref);
         occupantswin_occupants(room);