[grilo] core: Check if source is valid



commit fcf23a97ea6d8232643d0f5d4adf22d188307c5f
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Thu Jan 29 17:20:15 2015 +0000

    core: Check if source is valid
    
    Before checking if source is visible, check if it is a valid source.

 src/grl-registry.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-registry.c b/src/grl-registry.c
index fcb3931..fb41f78 100644
--- a/src/grl-registry.c
+++ b/src/grl-registry.c
@@ -1395,7 +1395,7 @@ grl_registry_lookup_source (GrlRegistry *registry,
 
   source = (GrlSource *) g_hash_table_lookup (registry->priv->sources,
                                               source_id);
-  if (!SOURCE_IS_INVISIBLE(source))
+  if (source && !SOURCE_IS_INVISIBLE(source))
     return source;
   return NULL;
 }


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