[Swfdec] libswfdec-gtk/swfdec_gtk_loader.c

Benjamin Otte company at kemper.freedesktop.org
Mon Dec 3 09:22:13 PST 2007


 libswfdec-gtk/swfdec_gtk_loader.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit fe3dd2e91416b669b84aa6394181639908328941
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon Dec 3 17:24:09 2007 +0100

    only emit EOF signal if we're not already EOF

diff --git a/libswfdec-gtk/swfdec_gtk_loader.c b/libswfdec-gtk/swfdec_gtk_loader.c
index 92f01f7..9836e3f 100644
--- a/libswfdec-gtk/swfdec_gtk_loader.c
+++ b/libswfdec-gtk/swfdec_gtk_loader.c
@@ -183,11 +183,16 @@ swfdec_gtk_loader_close (SwfdecLoader *loader)
   SwfdecGtkLoader *gtk = SWFDEC_GTK_LOADER (loader);
 
   if (gtk->message) {
-    SwfdecGtkLoaderClass *klass = SWFDEC_GTK_LOADER_GET_CLASS (gtk);
+    gboolean eof;
 
-    soup_session_cancel_message (klass->session, gtk->message);
-    g_object_unref (gtk->message);
-    gtk->message = NULL;
+    g_object_get (loader, "eof", &eof, NULL);
+    if (!eof) {
+      SwfdecGtkLoaderClass *klass = SWFDEC_GTK_LOADER_GET_CLASS (gtk);
+
+      soup_session_cancel_message (klass->session, gtk->message);
+      g_object_unref (gtk->message);
+      gtk->message = NULL;
+    }
   }
 }
 #endif


More information about the Swfdec mailing list