[rygel] core: Always disconnect handler
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Always disconnect handler
- Date: Fri, 23 Dec 2011 17:30:42 +0000 (UTC)
commit 8bfcff961a095c43138f0d8368dcdbb8b0a89551
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]