[Swfdec] libswfdec/swfdec_player.c

Benjamin Otte company at kemper.freedesktop.org
Fri Oct 19 09:26:44 PDT 2007


 libswfdec/swfdec_player.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b38e21f76203467410023fd469ccdb916c34bc19
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Oct 19 18:26:34 2007 +0200

    free the resource before checking stuff it references is gone

diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index f6e7317..a726b3b 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -767,6 +767,10 @@ swfdec_player_dispose (GObject *object)
 
   while (player->roots)
     swfdec_movie_destroy (player->roots->data);
+  if (player->resource) {
+    g_object_unref (player->resource);
+    player->resource = NULL;
+  }
 
   /* we do this here so references to GC'd objects get freed */
   G_OBJECT_CLASS (swfdec_player_parent_class)->dispose (object);
@@ -801,10 +805,6 @@ swfdec_player_dispose (GObject *object)
   g_queue_free (player->init_queue);
   g_queue_free (player->construct_queue);
   swfdec_cache_unref (player->cache);
-  if (player->resource) {
-    g_object_unref (player->resource);
-    player->resource = NULL;
-  }
   if (player->system) {
     g_object_unref (player->system);
     player->system = NULL;


More information about the Swfdec mailing list