From 2014f8c90602aeaca43783fb4b80cce8b0394db9 Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Tue, 11 Nov 2008 18:43:29 +0000 Subject: [PATCH] Prevent calling observers with a null client git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5538 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/client/BlockingCommunicator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/presents/client/BlockingCommunicator.java b/src/java/com/threerings/presents/client/BlockingCommunicator.java index e321f2ae0..82f238cb1 100644 --- a/src/java/com/threerings/presents/client/BlockingCommunicator.java +++ b/src/java/com/threerings/presents/client/BlockingCommunicator.java @@ -211,9 +211,10 @@ public class BlockingCommunicator extends Communicator log.info("Connection failed", ioe); // let the client know that things went south + final Client client = _client; notifyClientObservers(new ObserverOps.Client() { protected void notify (ClientObserver obs) { - obs.clientConnectionFailed(_client, ioe); + obs.clientConnectionFailed(client, ioe); } }); @@ -267,9 +268,10 @@ public class BlockingCommunicator extends Communicator log.debug("Writer thread exited."); // let the client observers know that we're logged off + final Client client = _client; notifyClientObservers(new ObserverOps.Session() { protected void notify (SessionObserver obs) { - obs.clientDidLogoff(_client); + obs.clientDidLogoff(client); } });