From 26ed72d10975f22473207ad5e70bc1d5b0b386a0 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 9 Dec 2002 17:19:04 +0000 Subject: [PATCH] Report an error rather than NPEing if we resume a session with a null _clobj. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2047 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/crowd/server/CrowdClient.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/crowd/server/CrowdClient.java b/src/java/com/threerings/crowd/server/CrowdClient.java index b3b12bd05..4623739bd 100644 --- a/src/java/com/threerings/crowd/server/CrowdClient.java +++ b/src/java/com/threerings/crowd/server/CrowdClient.java @@ -1,5 +1,5 @@ // -// $Id: CrowdClient.java,v 1.21 2002/12/05 16:39:21 mdb Exp $ +// $Id: CrowdClient.java,v 1.22 2002/12/09 17:19:04 mdb Exp $ package com.threerings.crowd.server; @@ -36,10 +36,16 @@ public class CrowdClient extends PresentsClient { super.sessionWillResume(); - // note that the user's active once more - BodyObject bobj = (BodyObject)_clobj; - BodyProvider.updateOccupantStatus( - bobj, bobj.location, OccupantInfo.ACTIVE); + if (_clobj != null) { + // note that the user's active once more + BodyObject bobj = (BodyObject)_clobj; + BodyProvider.updateOccupantStatus( + bobj, bobj.location, OccupantInfo.ACTIVE); + + } else { + Log.warning("Session resumed but we have no client object!? " + + "[client=" + this + "]."); + } } // documentation inherited