瀏覽代碼

BETA: Abstract variables minor fix.
* Prevents NPEs.

Reported by: Zoey76
Patch by: UnAfraid
Tested by: Zoey76

Zoey76 11 年之前
父節點
當前提交
2d20ec91c9
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java

+ 7 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java

@@ -20,6 +20,8 @@ package com.l2jserver.gameserver.model.variables;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import javolution.util.FastMap;
+
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.interfaces.IRestorable;
 import com.l2jserver.gameserver.model.interfaces.IStorable;
@@ -31,6 +33,11 @@ public abstract class AbstractVariables extends StatsSet implements IRestorable,
 {
 	private final AtomicBoolean _hasChanges = new AtomicBoolean(false);
 	
+	public AbstractVariables()
+	{
+		super(new FastMap<String, Object>().shared());
+	}
+	
 	/**
 	 * Overriding following methods to prevent from doing useless database operations if there is no changes since player's login.
 	 */