diff --git a/app/src/main/java/com/thirtydegreesray/openhub/ui/widget/webview/CodeWebView.java b/app/src/main/java/com/thirtydegreesray/openhub/ui/widget/webview/CodeWebView.java index 6e043981..9d37fae1 100644 --- a/app/src/main/java/com/thirtydegreesray/openhub/ui/widget/webview/CodeWebView.java +++ b/app/src/main/java/com/thirtydegreesray/openhub/ui/widget/webview/CodeWebView.java @@ -225,7 +225,13 @@ private String getAccentColor(){ private void startActivity(Uri uri){ if(uri == null) return; - AppOpener.launchUrl(getContext(), uri); + try { + AppOpener.launchUrl(getContext(), uri); + } catch (android.content.ActivityNotFoundException e) { + // The chosen custom-tabs / browser package can disappear between + // selection and launch (uninstall mid-tap, etc.). Swallow the + // exception so the host activity does not crash. + } } }