summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-09-02 14:40:25 +0200
committerJuan A. Suarez Romero <jasuarez@igalia.com>2015-09-06 16:13:54 +0200
commit47ba2b96045205024b26595f03b6d953917c7991 (patch)
treea31328b20543f0c9d3725ae841dd0a4b04d13685
parent495dad41cd8ac32a1ec2d17e89f2f6c0bd30d386 (diff)
downloadgrilo-plugins-47ba2b96045205024b26595f03b6d953917c7991.tar.gz
opensubtitles: Fix warnings running gnome-music
When running gnome-music, grl_source_query() will call expand_operation_keys() to try and find which sources could help add metadata. https://bugzilla.gnome.org/show_bug.cgi?id=754451
-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;
}