From f0c4c8c8a904f5c945fc107b1ed7f09b814f49d3 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Tue, 11 Feb 2014 00:03:34 -0600 Subject: [PATCH] Fixed Crash with unlinked wireless terminal --- helpers/WirelessTerminalGuiObject.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/helpers/WirelessTerminalGuiObject.java b/helpers/WirelessTerminalGuiObject.java index b3fc48a1d..2bdfcaa3d 100644 --- a/helpers/WirelessTerminalGuiObject.java +++ b/helpers/WirelessTerminalGuiObject.java @@ -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 );