[rygel/rygel-0-12] core: Always disconnect handler



commit a3f3e92cf606e0fa2229af130c3fa6ee1c200252
Author: Jens Georg <mail jensge org>
Date:   Fri Nov 18 09:55:40 2011 +0100

    core: Always disconnect handler
    
    Prevents reference leaks on the container searched in.

 src/rygel/rygel-simple-container.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel/rygel-simple-container.vala b/src/rygel/rygel-simple-container.vala
index 79fcafd..4b82bb4 100644
--- a/src/rygel/rygel-simple-container.vala
+++ b/src/rygel/rygel-simple-container.vala
@@ -162,6 +162,10 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
                     var container = child as MediaContainer;
                     media_object = yield container.find_object (id, cancellable);
 
+                    if (updated_id != 0) {
+                        this.disconnect (updated_id);
+                    }
+
                     if (media_object != null) {
                         // no need to loop when we've found what we were looking
                         // for
@@ -173,10 +177,6 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
                     if (restart) {
                         break;
                     }
-
-                    if (updated_id != 0) {
-                        this.disconnect (updated_id);
-                    }
                 }
             }
         } while (restart && restart_count < 10);



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