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, 4 insertions, 1 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 0d044704..da7a8e99 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -660,7 +660,10 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
         if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
             // both changed
             if ((g_strcmp0(role, old_role) != 0) && (g_strcmp0(affiliation, old_affiliation) != 0)) {
-                mucwin_occupant_role_and_affiliation_change(room, nick, role, affiliation, actor, reason);
+                ProfMucWin *mucwin = wins_get_muc(room);
+                if (mucwin) {
+                    mucwin_occupant_role_and_affiliation_change(mucwin, nick, role, affiliation, actor, reason);
+                }
 
             // role changed
             } else if (g_strcmp0(role, old_role) != 0) {