From 597582ddd8e22da482b35fd75b3d6e1ac93e3bb6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 18 Aug 2021 00:04:34 -0500 Subject: [PATCH] Add workaround for NPE in getNetworkInterfaces() --- .../java/com/limelight/preferences/AddComputerManually.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/limelight/preferences/AddComputerManually.java b/app/src/main/java/com/limelight/preferences/AddComputerManually.java index 982132b5..7a25ba54 100644 --- a/app/src/main/java/com/limelight/preferences/AddComputerManually.java +++ b/app/src/main/java/com/limelight/preferences/AddComputerManually.java @@ -88,11 +88,11 @@ public class AddComputerManually extends Activity { // Couldn't find a matching interface return true; - } catch (SocketException e) { + } catch (Exception e) { + // Catch all exceptions because some broken Android devices + // will throw an NPE from inside getNetworkInterfaces(). e.printStackTrace(); return false; - } catch (UnknownHostException e) { - return false; } }