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:
Ray Greenwell
2008-07-11 02:07:04 +00:00
parent b903087fa9
commit fc6d6350f4
+1 -1
View File
@@ -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];
}
}