From b89f5dc4196bc0950247d51be66aa572bdbf65c8 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 13 Nov 2002 01:29:41 +0000 Subject: [PATCH] Log a stack trace (and refuse to do it) if someone tries to register the same chat display twice. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1941 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/crowd/chat/client/ChatDirector.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index 53b10141a..e10c7bdc8 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -1,5 +1,5 @@ // -// $Id: ChatDirector.java,v 1.39 2002/11/08 07:28:23 ray Exp $ +// $Id: ChatDirector.java,v 1.40 2002/11/13 01:29:41 ray Exp $ package com.threerings.crowd.chat; @@ -96,6 +96,11 @@ public class ChatDirector extends BasicDirector */ public void addChatDisplay (ChatDisplay display) { + if (_displays.contains(display)) { + Log.warning("Tried to add ChatDisplay more than once!"); + Log.logStackTrace(new Exception()); + return; + } _displays.add(display); }