[libhandy/tab-fixes: 1/6] tab-box: Null-check drag icon in drag_end()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/tab-fixes: 1/6] tab-box: Null-check drag icon in drag_end()
- Date: Tue, 9 Feb 2021 13:21:00 +0000 (UTC)
commit 35f94253ae3034c59c3bf401243f30745d54c42f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Feb 7 13:57:26 2021 +0500
tab-box: Null-check drag icon in drag_end()
That function can be called multiple times in some cases.
src/hdy-tab-box.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-tab-box.c b/src/hdy-tab-box.c
index cd076911..07064a99 100644
--- a/src/hdy-tab-box.c
+++ b/src/hdy-tab-box.c
@@ -3091,8 +3091,10 @@ hdy_tab_box_drag_end (GtkWidget *widget,
self->detached_page = NULL;
- gtk_widget_destroy (self->drag_icon->window);
- g_clear_pointer (&self->drag_icon, g_free);
+ if (self->drag_icon) {
+ gtk_widget_destroy (self->drag_icon->window);
+ g_clear_pointer (&self->drag_icon, g_free);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]