From fd74fa955f33aa74fb0f49c837e67a94c5cd1475 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 8 Nov 2008 03:21:12 +0000 Subject: [PATCH] Don't append a null if we're clearing out a local attribute that's not set. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5528 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/dobj/DObject.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/dobj/DObject.java b/src/java/com/threerings/presents/dobj/DObject.java index 108088bc7..7ae3dd595 100644 --- a/src/java/com/threerings/presents/dobj/DObject.java +++ b/src/java/com/threerings/presents/dobj/DObject.java @@ -651,7 +651,12 @@ public class DObject } } - // append our attribute to the end of the list + // if we were trying to clear out an attribute but didn't find it, then stop here + if (attr == null) { + return; + } + + // otherwise append our attribute to the end of the list _locattrs = ArrayUtil.append(_locattrs, attr); }