Flash drives me nuts.
Doing a loop on a null object works: for (s in null) But checking to see if a property is in a null object throws an error: (s in null) They're so similar! So, protect against the NPE. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5233 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -52,7 +52,7 @@ public class Util
|
||||
|
||||
if (defaults != null) {
|
||||
for (prop in defaults) {
|
||||
if (!(prop in initProps)) {
|
||||
if (initProps == null || !(prop in initProps)) {
|
||||
target[prop] = defaults[prop];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user