Skip to content

Commit 898afeb

Browse files
committed
room.d: fix crash when setting the same ticker twice
1 parent 129c315 commit 898afeb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/room.d

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ final class Room
138138
return;
139139

140140
const old_content = get_ticker(username);
141+
if (content == old_content)
142+
return;
143+
141144
if (old_content !is null)
142-
if (content != old_content)
143-
del_ticker(username);
145+
del_ticker(username);
144146

145147
if (content.length == 0)
146148
return;

0 commit comments

Comments
 (0)