[telepathy-mission-control/master] mcd_dispatcher_guess_request_handler, mcd_dispatcher_dup_possible_handlers: assert that channels do have properties

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 20 12:09:15 PDT 2009


As per wjt's review of dr4.5 branch.
---
 src/mcd-dispatcher.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 8ae82a5..3c988cd 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -288,6 +288,7 @@ mcd_dispatcher_guess_request_handler (McdDispatcher *dispatcher,
      * can take it */
 
     channel_properties = _mcd_channel_get_requested_properties (channel);
+    g_assert (channel_properties != NULL); /* all requests should have these */
 
     _mcd_client_registry_init_hash_iter (dispatcher->priv->clients, &iter);
     while (g_hash_table_iter_next (&iter, NULL, &client))
@@ -392,6 +393,10 @@ mcd_dispatcher_dup_possible_handlers (McdDispatcher *self,
             if (properties == NULL)
             {
                 properties = _mcd_channel_get_requested_properties (channel);
+                /* the only way we should ever fail to have the immutable
+                 * properties is if it's a request, in which case it has
+                 * requested properties instead */
+                g_assert (properties != NULL);
             }
 
             quality = _mcd_client_match_filters (properties,
-- 
1.5.6.5




More information about the telepathy-commits mailing list