aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java
index 79904bbc..ac305a11 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java
@@ -92,6 +92,11 @@ public class LinkResolverActivity extends AppCompatActivity {
}
if (uri.getScheme() == null && uri.getHost() == null) {
+ if (uri.toString().isEmpty()) {
+ Toast.makeText(this, R.string.invalid_link, Toast.LENGTH_SHORT).show();
+ finish();
+ return;
+ }
handleUri(getRedditUriByPath(uri.toString()));
} else {
handleUri(uri);