RS485/LogisticsPipes — pull request #30 by TheLoneWolfling (2012-07-31 10:57:18+00:00)
Title: Added null check for destination pipe

Router.getPipe returns null if the result isn't a pipe, which is a case which isn't currently handled by PacketPipeLogisticsContent. This patch adds a null check for the destination pipe, which fixes the following crash our server had:

java.lang.NullPointerException
at buildcraft.krapht.network.PacketPipeLogisticsContent.(PacketPipeLogisticsContent.java:53)
at buildcraft.krapht.PipeTransportLogistics.createItemPacket(PipeTransportLogistics.java:351)
at buildcraft.krapht.PipeTransportLogistics.resolveDestination(PipeTransportLogistics.java:158)
at buildcraft.transport.PipeTransportItems.moveSolids(PipeTransportItems.java:197)
at buildcraft.transport.PipeTransportItems.updateEntity(PipeTransportItems.java:154)
at buildcraft.krapht.PipeTransportLogistics.updateEntity(PipeTransportLogistics.java:83)
at buildcraft.transport.Pipe.updateEntity(Pipe.java:189)
at buildcraft.krapht.CoreRoutedPipe.updateEntity(CoreRoutedPipe.java:152)
at buildcraft.transport.TileGenericPipe.q_(TileGenericPipe.java:146)
at ge.f(World.java:1608)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:564)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450)
at dn.run(SourceFile:492)