diff options
author | P. J. McDermott <pj@pehjota.net> | 2018-10-02 18:00:33 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2018-10-02 18:00:33 (EDT) |
commit | 608a85bf14be409af5e587b3e61782805a11fa47 (patch) | |
tree | eb04a4ec2a698ffbb8e06e2f94607259b4d260c1 | |
parent | cd4d5143b62f51fc1a229d2ea8b589be9eaf2f7f (diff) | |
download | marquee-608a85bf14be409af5e587b3e61782805a11fa47.zip marquee-608a85bf14be409af5e587b3e61782805a11fa47.tar.gz marquee-608a85bf14be409af5e587b3e61782805a11fa47.tar.bz2 |
MqTabLabel: Only hide popover on close if it's shown
Fixes:
(marquee:...): Gtk-CRITICAL **: gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed
-rw-r--r-- | src/tab-label.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tab-label.c b/src/tab-label.c index 7680532..8ada3dd 100644 --- a/src/tab-label.c +++ b/src/tab-label.c @@ -70,7 +70,12 @@ reload_tab_clicked_cb(GtkWidget G_GNUC_UNUSED *button, MqTabLabel *tab_label) static void close_clicked_cb(GtkWidget G_GNUC_UNUSED *button, MqTabLabel *tab_label) { - gtk_widget_hide(tab_label->popover); + if (tab_label->popover) { + /* This callback handles both the close button on the tab label + * and the one on the popover. Only hide the popover if it's + * shown. */ + gtk_widget_hide(tab_label->popover); + } mq_tab_page_close(tab_label->tab_page); } |