[gtksourceview/gtksourceview-5-4] vim: chain dispose before clearing sub-state
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/gtksourceview-5-4] vim: chain dispose before clearing sub-state
- Date: Thu, 21 Apr 2022 20:07:31 +0000 (UTC)
commit d6749cf3521b216c99cec112bf57020e0d0a2861
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 19 16:39:49 2022 -0700
vim: chain dispose before clearing sub-state
We want to ensure we dispose first (which will unparent the sub-state
cleanly) before we release our pointers. Otherwise as the sub-state is
popped, leave could be called and need access to history, etc.
gtksourceview/vim/gtksourceviminsert.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtksourceview/vim/gtksourceviminsert.c b/gtksourceview/vim/gtksourceviminsert.c
index 516921a1..477ff8b8 100644
--- a/gtksourceview/vim/gtksourceviminsert.c
+++ b/gtksourceview/vim/gtksourceviminsert.c
@@ -467,14 +467,13 @@ gtk_source_vim_insert_dispose (GObject *object)
{
GtkSourceVimInsert *self = (GtkSourceVimInsert *)object;
- g_clear_pointer (&self->prefix, g_free);
+ G_OBJECT_CLASS (gtk_source_vim_insert_parent_class)->dispose (object);
+ g_clear_pointer (&self->prefix, g_free);
gtk_source_vim_state_release (&self->history);
gtk_source_vim_state_release (&self->motion);
gtk_source_vim_state_release (&self->selection_motion);
gtk_source_vim_state_release (&self->text_object);
-
- G_OBJECT_CLASS (gtk_source_vim_insert_parent_class)->dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]