[libpanel/gbsneto/no-autofree: 10/12] save-dialog: Drop g_auto* usage
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpanel/gbsneto/no-autofree: 10/12] save-dialog: Drop g_auto* usage
- Date: Mon, 5 Sep 2022 19:56:52 +0000 (UTC)
commit e7b5c1adc3e542f21d291d8177be710ca90e754d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Sep 5 16:49:45 2022 -0300
save-dialog: Drop g_auto* usage
src/panel-save-dialog.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/panel-save-dialog.c b/src/panel-save-dialog.c
index a4e95ca..5e8f6f2 100644
--- a/src/panel-save-dialog.c
+++ b/src/panel-save-dialog.c
@@ -142,7 +142,7 @@ panel_save_dialog_run_async (PanelSaveDialog *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_autoptr(GTask) task = NULL;
+ GTask *task = NULL;
g_return_if_fail (PANEL_IS_SAVE_DIALOG (self));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
@@ -156,6 +156,7 @@ panel_save_dialog_run_async (PanelSaveDialog *self,
{
gtk_window_destroy (GTK_WINDOW (self));
g_task_return_boolean (task, TRUE);
+ g_clear_object (&task);
return;
}
@@ -165,10 +166,12 @@ panel_save_dialog_run_async (PanelSaveDialog *self,
G_IO_ERROR,
G_IO_ERROR_INVAL,
"Run has already been called");
+ g_clear_object (&task);
return;
}
- g_set_object (&self->task, task);
+ g_clear_object (&self->task);
+ self->task = g_steal_pointer (&task);
gtk_window_present (GTK_WINDOW (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]