From: Armaan Bhojwani Date: Thu, 10 Jun 2021 17:58:51 +0000 (-0400) Subject: Check if uri is NULL X-Git-Tag: v1.0.0~8 X-Git-Url: https://git.armaanb.net/?p=chorizo.git;a=commitdiff_plain;h=d03513da57afb7151aafba198d0a95f10e097c26 Check if uri is NULL --- 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 *