logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 7e427d599e74d8b1b89afafdaa7628a3e8483afb
parent: 3a0b708a88209682bf813ac50cd21e4f8014839a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 22 Aug 2020 08:15:32 +0200

badwolf.c: unref web_context and settings, let widget_destroy remove the page

Diffstat:

Mbadwolf.c5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -74,9 +74,6 @@ WebViewCb_close(WebKitWebView *webView, gpointer user_data) { (void)webView; struct Client *browser = (struct Client *)user_data; - GtkNotebook *notebook = GTK_NOTEBOOK(browser->window->notebook); - - gtk_notebook_remove_page(notebook, gtk_notebook_page_num(GTK_NOTEBOOK(notebook), browser->box)); gtk_widget_destroy(browser->box); @@ -680,6 +677,8 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b settings, NULL)); gtk_widget_set_name(GTK_WIDGET(browser->webView), "browser__webView"); + g_object_unref(web_context); + g_object_unref(settings); gtk_box_pack_start( GTK_BOX(browser->toolbar), GTK_WIDGET(browser->back), FALSE, FALSE, BADWOLF_TOOLBAR_PADDING);