[grilo] core: check for supported_keys implementation



commit 04eb6a6a7b6b46343909f260ccbe853a57434c3d
Author: Víctor Manuel Jáquez Leal <vjaquez igalia com>
Date:   Fri Sep 10 13:13:48 2010 +0200

    core: check for supported_keys implementation
    
    Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>

 src/grl-metadata-source.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 81817bf..c9c206f 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -509,7 +509,11 @@ const GList *
 grl_metadata_source_supported_keys (GrlMetadataSource *source)
 {
   g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL);
-  return GRL_METADATA_SOURCE_GET_CLASS (source)->supported_keys (source);
+  if (GRL_METADATA_SOURCE_GET_CLASS (source)->supported_keys) {
+    return GRL_METADATA_SOURCE_GET_CLASS (source)->supported_keys (source);
+  } else {
+    return NULL;
+  }
 }
 
 /**



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