Browse Source

Fix for empty bookmark

tags/0.8.10^0
Julien Blanchard 11 months ago
parent
commit
57f402e429
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/main.rs

+ 5
- 2
src/main.rs View File

@@ -157,9 +157,12 @@ fn update_url_field(gui: &Arc<Gui>, url: &str) {
157 157
 fn add_bookmark(gui: &Arc<Gui>) {
158 158
     let url_bar = gui.url_bar();
159 159
     let current_url = url_bar.get_text();
160
+
160 161
     if let Some(url) = current_url {
161
-        bookmarks::add(&url);
162
-        dialog::info(&gui, "Bookmark added.");
162
+        if url != "" {
163
+            bookmarks::add(&url);
164
+            dialog::info(&gui, "Bookmark added.");
165
+        }
163 166
     }
164 167
 }
165 168
 

Loading…
Cancel
Save