Fixed Crash with unlinked wireless terminal

This commit is contained in:
AlgorithmX2 2014-02-11 00:03:34 -06:00
parent 2a60d619de
commit f0c4c8c8a9

View file

@ -52,8 +52,18 @@ public class WirelessTerminalGuiObject implements IPortableCell
myPlayer = ep;
wth = wh;
long encKey = Long.parseLong( encryptionKey );
Object obj = AEApi.instance().registries().locateable().findLocateableBySerial( encKey );
Object obj = null;
try
{
long encKey = Long.parseLong( encryptionKey );
obj = AEApi.instance().registries().locateable().findLocateableBySerial( encKey );
}
catch (NumberFormatException err)
{
// :P
}
if ( obj instanceof IGridHost )
{
IGridNode n = ((IGridHost) obj).getGridNode( ForgeDirection.UNKNOWN );