summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2015-05-03 12:07:59 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2015-05-03 12:07:59 +0100
commitf6f4e3e5eb75d1f17eb1fa9cc8aa3c9b31bb38f1 (patch)
tree207fb4c52dcff426ca406f37e7e61aacd47122b6
parentf2d18cbcc9e33d4e3a92abde8cdad428c031dd7e (diff)
downloadlibgdata-f6f4e3e5eb75d1f17eb1fa9cc8aa3c9b31bb38f1.tar.gz
youtube: Add a missing strv NULL dereference check
Spotted by Coverity. CID: #109874
-rw-r--r--gdata/services/youtube/gdata-youtube-video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index 6ce66773..130499dd 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -1722,7 +1722,7 @@ strv_contains (const gchar * const *strv, const gchar *key)
{
guint i;
- for (i = 0; strv[i] != NULL; i++) {
+ for (i = 0; strv != NULL && strv[i] != NULL; i++) {
if (g_strcmp0 (strv[i], key) == 0) {
return TRUE;
}