]> git.armaanb.net Git - chorizo.git/commitdiff
Check if uri is NULL
authorArmaan Bhojwani <me@armaanb.net>
Thu, 10 Jun 2021 17:58:51 +0000 (13:58 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Thu, 10 Jun 2021 21:41:58 +0000 (17:41 -0400)
src/browser.c

index ea8371a5c1f92065b2b9e2b1ca46c84bd645e192..488511991262bc77bd8eb3a31347e8a6e0885b28 100644 (file)
@@ -124,9 +124,8 @@ client_destroy(GtkWidget *widget, gpointer data) {
 
 void
 set_uri(const char *uri, struct Client *c) {
-    if (!gtk_widget_is_focus(c->location)) {
+    if (!gtk_widget_is_focus(c->location) && uri != NULL)
         gtk_entry_set_text(GTK_ENTRY(c->location), uri);
-    }
 }
 
 WebKitWebView *