Browse Source

Fix assertion failures on quitting

Přemysl Janouch 5 months ago
parent
commit
c2caf2b825
Signed by: Přemysl Janouch <p@janouch.name> GPG Key ID: A0420B94F92B9493
1 changed files with 14 additions and 1 deletions
  1. 14
    1
      liblogdiag/ld-diagram-view.c

+ 14
- 1
liblogdiag/ld-diagram-view.c View File

@@ -235,6 +235,7 @@ static void ld_diagram_view_get_property (GObject *object, guint property_id,
235 235
 	GValue *value, GParamSpec *pspec);
236 236
 static void ld_diagram_view_set_property (GObject *object, guint property_id,
237 237
 	const GValue *value, GParamSpec *pspec);
238
+static void ld_diagram_view_dispose (GObject *gobject);
238 239
 static void ld_diagram_view_finalize (GObject *gobject);
239 240
 
240 241
 static void set_hadjustment
@@ -400,6 +401,7 @@ ld_diagram_view_class_init (LdDiagramViewClass *klass)
400 401
 	object_class = G_OBJECT_CLASS (klass);
401 402
 	object_class->get_property = ld_diagram_view_get_property;
402 403
 	object_class->set_property = ld_diagram_view_set_property;
404
+	object_class->dispose = ld_diagram_view_dispose;
403 405
 	object_class->finalize = ld_diagram_view_finalize;
404 406
 
405 407
 	klass->cancel_operation = ld_diagram_view_real_cancel_operation;
@@ -567,7 +569,7 @@ ld_diagram_view_init (LdDiagramView *self)
567 569
 }
568 570
 
569 571
 static void
570
-ld_diagram_view_finalize (GObject *gobject)
572
+ld_diagram_view_dispose (GObject *gobject)
571 573
 {
572 574
 	LdDiagramView *self;
573 575
 
@@ -576,6 +578,17 @@ ld_diagram_view_finalize (GObject *gobject)
576 578
 	g_object_set (self, "hadjustment", NULL, NULL);
577 579
 	g_object_set (self, "vadjustment", NULL, NULL);
578 580
 
581
+	/* Chain up to the parent class. */
582
+	G_OBJECT_CLASS (ld_diagram_view_parent_class)->dispose (gobject);
583
+}
584
+
585
+static void
586
+ld_diagram_view_finalize (GObject *gobject)
587
+{
588
+	LdDiagramView *self;
589
+
590
+	self = LD_DIAGRAM_VIEW (gobject);
591
+
579 592
 	if (self->priv->diagram)
580 593
 	{
581 594
 		diagram_disconnect_signals (self);

Loading…
Cancel
Save