From 82f75cd194340e68f9a1b4dc7732745546f9d7fe Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Wed, 13 Feb 2019 22:55:43 +0100 Subject: [PATCH] Avoid double client destroy in case of webview close #537. --- src/main.c | 2 +- tests/manual/js-window-close.html | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tests/manual/js-window-close.html diff --git a/src/main.c b/src/main.c index 71a4007..b2cf5c6 100644 --- a/src/main.c +++ b/src/main.c @@ -1195,7 +1195,7 @@ static void on_webdownload_received_data(WebKitDownload *download, */ static void on_webview_close(WebKitWebView *webview, Client *c) { - client_destroy(c); + gtk_widget_destroy(c->window); } /** diff --git a/tests/manual/js-window-close.html b/tests/manual/js-window-close.html new file mode 100644 index 0000000..160d615 --- /dev/null +++ b/tests/manual/js-window-close.html @@ -0,0 +1,9 @@ + + +JS Window Close + + +Click on following link should close the window without crashing.
+Close this window + + -- 2.20.1