From d03513da57afb7151aafba198d0a95f10e097c26 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Thu, 10 Jun 2021 13:58:51 -0400 Subject: [PATCH] Check if uri is NULL --- src/browser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/browser.c b/src/browser.c index ea8371a..4885119 100644 --- a/src/browser.c +++ b/src/browser.c @@ -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 * -- 2.39.2