[gtksourceview/wip/chergert/hoverers: 9/10] completion: cleanup destruction of assistant




commit ad535edf0166a8e22b3b2dfedc5eda17cfb0d03e
Author: Christian Hergert <chergert redhat com>
Date:   Mon Mar 8 18:54:59 2021 -0800

    completion: cleanup destruction of assistant

 gtksourceview/gtksourcecompletion.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 81a9db43..b18ffaa3 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -881,11 +881,7 @@ gtk_source_completion_dispose (GObject *object)
        gtk_source_signal_group_set_target (self->buffer_signals, NULL);
        gtk_source_signal_group_set_target (self->view_signals, NULL);
 
-       if (self->display != NULL)
-       {
-               _gtk_source_assistant_destroy (GTK_SOURCE_ASSISTANT (self->display));
-               self->display = NULL;
-       }
+       g_clear_pointer ((GtkSourceAssistant **)&self->display, _gtk_source_assistant_destroy);
 
        g_clear_object (&self->context);
        g_clear_object (&self->cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]