DroidFish: Fix crash when starting network engine.

Fix crash when trying to start an incorrectly configured network engine
with an invalid port number.
This commit is contained in:
Peter Osterlund 2018-03-10 08:07:15 +01:00
parent c64896b61f
commit 833a5afeef

View File

@ -92,12 +92,15 @@ public class NetworkEngine extends UCIEngineBase {
} catch (UnknownHostException e) {
isError = true;
report.reportError(e.getMessage());
} catch (NumberFormatException nfe) {
} catch (IllegalArgumentException e) {
isError = true;
report.reportError(context.getString(R.string.invalid_network_port));
} catch (IOException e) {
isError = true;
report.reportError(e.getMessage());
} catch (SecurityException e) {
isError = true;
report.reportError(e.getMessage());
}
}
if (socket == null)