[gupnp-tools] Don't crash on variable-only service



commit f9e0333da773d0afbec2f8e7b412f57d2830ef8c
Author: Jens Georg <mail jensge org>
Date:   Sun Oct 20 12:11:28 2013 +0200

    Don't crash on variable-only service
    
    Also keep a reference to introspection when adding service variables into the
    treeview. Otherwise the introspection gets unreffed in device-treeview.c:528
    and the state variables become invalid.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672863

 src/universal-cp/device-treeview.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/universal-cp/device-treeview.c b/src/universal-cp/device-treeview.c
index b1a20d1..8a8af8e 100644
--- a/src/universal-cp/device-treeview.c
+++ b/src/universal-cp/device-treeview.c
@@ -445,6 +445,7 @@ append_actions (GUPnPServiceProxy         *proxy,
 
 static void
 append_state_variables (GUPnPServiceProxy *proxy,
+                        GUPnPServiceIntrospection *introspection,
                         const GList       *variables,
                         GtkTreeStore      *store,
                         GtkTreeIter       *service_iter)
@@ -471,6 +472,7 @@ append_state_variables (GUPnPServiceProxy *proxy,
                                  0, get_icon_by_id (ICON_VARIABLE),
                                  1, info->name,
                                  2, proxy,
+                                 3, introspection,
                                  4, info,
                                  5, ICON_VARIABLE,
                                  -1);
@@ -507,6 +509,7 @@ append_introspection (GUPnPServiceProxy         *proxy,
                         introspection);
         if (list)
                 append_state_variables (proxy,
+                                        introspection,
                                         list,
                                         store,
                                         service_iter);


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