summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/opensubtitles/grl-opensubtitles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opensubtitles/grl-opensubtitles.c b/src/opensubtitles/grl-opensubtitles.c
index 1009128..6237d7e 100644
--- a/src/opensubtitles/grl-opensubtitles.c
+++ b/src/opensubtitles/grl-opensubtitles.c
@@ -558,9 +558,9 @@ grl_opensubtitles_source_may_resolve (GrlSource *source,
!grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_SIZE)) {
if (missing_keys) {
GList *keys = NULL;
- if (!grl_data_has_key (GRL_DATA (media), priv->hash_keyid))
+ if (!media || !grl_data_has_key (GRL_DATA (media), priv->hash_keyid))
keys = g_list_prepend (keys, GRLKEYID_TO_POINTER (priv->hash_keyid));
- if (!grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_SIZE))
+ if (!media || !grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_SIZE))
keys = g_list_prepend (keys, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_SIZE));
*missing_keys = keys;
}