Fixed a problem with mergeFrom() where a key that was explicitly mapped to null was taken to mean it had no mapping. Checking that the key has a mapping instead fixes problem.

accellbaker
mitm 6 years ago
parent d785caa5ca
commit 416b866c78
  1. 2
      jme3-core/src/main/java/com/jme3/system/AppSettings.java

@ -274,7 +274,7 @@ public final class AppSettings extends HashMap<String, Object> {
*/ */
public void mergeFrom(AppSettings other) { public void mergeFrom(AppSettings other) {
for (String key : other.keySet()) { for (String key : other.keySet()) {
if (get(key) == null) { if( !this.containsKey(key) ) {
put(key, other.get(key)); put(key, other.get(key));
} }
} }

Loading…
Cancel
Save