Browse Source

Safety check, not allow saving of the offline characters in some cases.

_DS_ 15 years ago
parent
commit
a31d09ac4a

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/network/L2GameClient.java

@@ -730,7 +730,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>>
 			try
 			{
 				L2PcInstance player = L2GameClient.this.getActiveChar();
-				if (player != null)
+				if (player != null && player.isOnline() > 0) // safety precaution
 				{
 					saveCharToDisk(player, true);
 					if (player.getPet() != null)