summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-label.c7
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);
}