[PATCH 16/16] core: Checked for 'key-depends' implementation



---
 src/grl-metadata-source.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 340f6b7..afc3af8 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -548,7 +548,12 @@ const GList *
 grl_metadata_source_key_depends (GrlMetadataSource *source, GrlKeyID key_id)
 {
   g_return_val_if_fail (GRL_IS_METADATA_SOURCE (source), NULL);
-  return GRL_METADATA_SOURCE_GET_CLASS (source)->key_depends (source, key_id);
+
+  if (GRL_METADATA_SOURCE_GET_CLASS (source)->key_depends) {
+    return GRL_METADATA_SOURCE_GET_CLASS (source)->key_depends (source, key_id);
+  } else {
+    return NULL;
+  }
 }
 
 /**
-- 
1.7.0.4



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