Fixed NPE on CustomPayload packets with 0 data

This commit is contained in:
LexManos 2012-03-22 19:30:59 -07:00
parent 43ac9d6799
commit be1dd4934a
1 changed files with 5 additions and 0 deletions

View File

@ -406,6 +406,11 @@ public class MessageManager
public void dispatchIncomingMessage(NetworkManager manager, String channel, byte[] data)
{
if (data == null)
{
data = new byte[0];
}
if (channel.equals("Forge"))
{
if (ForgeHooks.getPacketHandler() != null)