[epiphany] Fix Crash closing last tab with Ctrl+W
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix Crash closing last tab with Ctrl+W
- Date: Sat, 11 May 2019 15:04:12 +0000 (UTC)
commit 433ce47815c9cb4d7ee09d828456d27bb6f7663f
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri May 10 19:58:08 2019 +0200
Fix Crash closing last tab with Ctrl+W
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/758
src/ephy-pages-popover.c | 3 +++
src/ephy-window.c | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-pages-popover.c b/src/ephy-pages-popover.c
index b490d1a4b..5ee4a9790 100644
--- a/src/ephy-pages-popover.c
+++ b/src/ephy-pages-popover.c
@@ -139,6 +139,9 @@ items_changed_cb (EphyPagesPopover *self,
g_signal_connect_swapped (items[i], "closed", G_CALLBACK (row_closed_cb), self);
}
+ if (position + removed > added)
+ return;
+
g_list_store_splice (self->list_store, position, removed, (gpointer) items, added);
current_page_changed_cb (self);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 81a75977a..fd31a0588 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2736,8 +2736,10 @@ notebook_page_removed_cb (EphyNotebook *notebook,
tab_accels_update (window);
- if (gtk_notebook_get_n_pages (window->notebook) == 0)
- gtk_window_close (GTK_WINDOW (window));
+ if (gtk_notebook_get_n_pages (window->notebook) == 0) {
+ ephy_window_close (window);
+ gtk_widget_destroy (GTK_WIDGET (window));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]