Browse Source

Deadlock fix.

nBd 17 years ago
parent
commit
061019fcc0

+ 9 - 13
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

@@ -8473,14 +8473,14 @@ public final class L2PcInstance extends L2PlayableInstance
 	{
 	{
 		L2ItemInstance item;
 		L2ItemInstance item;
 		IItemHandler handler;
 		IItemHandler handler;
-
+		
 		if (_activeSoulShots == null || _activeSoulShots.size() == 0)
 		if (_activeSoulShots == null || _activeSoulShots.size() == 0)
 			return;
 			return;
 		
 		
-		Collection<Integer> vals = _activeSoulShots.values();
-		
-		synchronized (_activeSoulShots)
+		try
 		{
 		{
+			Collection<Integer> vals = _activeSoulShots.values();
+			
 			for (int itemId : vals)
 			for (int itemId : vals)
 			{
 			{
 				item = getInventory().getItemByItemId(itemId);
 				item = getInventory().getItemByItemId(itemId);
@@ -8524,13 +8524,7 @@ public final class L2PcInstance extends L2PlayableInstance
 							if (itemId == 1463 || itemId == 1464
 							if (itemId == 1463 || itemId == 1464
 							        || itemId == 1465 || itemId == 1466
 							        || itemId == 1465 || itemId == 1466
 							        || itemId == 1467 || itemId == 1835
 							        || itemId == 1467 || itemId == 1835
-							        || itemId == 5789 /*
-													 * || itemId == 6535 ||
-													 * itemId == 6536 || itemId
-													 * == 6537 || itemId == 6538
-													 * || itemId == 6539 ||
-													 * itemId == 6540
-													 */)
+							        || itemId == 5789)
 							{
 							{
 								handler = ItemHandler.getInstance().getItemHandler(itemId);
 								handler = ItemHandler.getInstance().getItemHandler(itemId);
 								
 								
@@ -8556,10 +8550,12 @@ public final class L2PcInstance extends L2PlayableInstance
 				}
 				}
 			}
 			}
 		}
 		}
+		catch (NullPointerException npe)
+		{
+			
+		}
 	}
 	}
 
 
-
-
 	private ScheduledFuture<?> _taskWarnUserTakeBreak;
 	private ScheduledFuture<?> _taskWarnUserTakeBreak;
 
 
 	class WarnUserTakeBreak implements Runnable
 	class WarnUserTakeBreak implements Runnable