[totem] main: Use g_clear_object()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Use g_clear_object()
- Date: Wed, 11 Jul 2012 09:55:43 +0000 (UTC)
commit 802d2d611ef5e60fb4f50b68c4be80c7fd1ba15d
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 5 18:40:30 2012 +0100
main: Use g_clear_object()
src/totem-object.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 77107eb..e33c516 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -475,10 +475,7 @@ totem_object_plugins_init (TotemObject *totem)
void
totem_object_plugins_shutdown (TotemObject *totem)
{
- if (totem->engine != NULL) {
- g_object_unref (totem->engine);
- totem->engine = NULL;
- }
+ g_clear_object (&totem->engine);
}
/**
@@ -1067,11 +1064,8 @@ totem_object_action_exit (TotemObject *totem)
totem_sublang_exit (totem);
totem_destroy_file_filters ();
- if (totem->settings)
- g_object_unref (totem->settings);
-
- if (totem->fs)
- g_object_unref (totem->fs);
+ g_clear_object (&totem->settings);
+ g_clear_object (&totem->fs);
if (totem->win)
gtk_widget_destroy (GTK_WIDGET (totem->win));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]