Browse Source

Don't crash on empty URLs

tags/0.8.11^0
Julien Blanchard 11 months ago
parent
commit
59652a81d7
3 changed files with 5 additions and 3 deletions
  1. 1
    1
      Cargo.lock
  2. 1
    1
      Cargo.toml
  3. 3
    1
      src/main.rs

+ 1
- 1
Cargo.lock View File

@@ -112,7 +112,7 @@ dependencies = [
112 112
 
113 113
 [[package]]
114 114
 name = "castor"
115
-version = "0.8.10"
115
+version = "0.8.11"
116 116
 dependencies = [
117 117
  "ansi-parser",
118 118
  "dirs",

+ 1
- 1
Cargo.toml View File

@@ -1,6 +1,6 @@
1 1
 [package]
2 2
 name = "castor"
3
-version = "0.8.10"
3
+version = "0.8.11"
4 4
 authors = ["Julien Blanchard <julien@typed-hole.org>"]
5 5
 edition = "2018"
6 6
 

+ 3
- 1
src/main.rs View File

@@ -106,7 +106,9 @@ fn main() {
106 106
 }
107 107
 
108 108
 fn route_url(gui: &Arc<Gui>, url: String) {
109
-    if url.starts_with("gemini://") {
109
+    if url == "" {
110
+        return
111
+    } else if url.starts_with("gemini://") {
110 112
         visit_url(&gui, Gemini { source: url })
111 113
     } else if url.starts_with("gopher://") {
112 114
         visit_url(&gui, Gopher { source: url })

Loading…
Cancel
Save