diff options
author | wm4 <wm4@nowhere> | 2013-10-12 17:19:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-12 18:57:02 +0200 |
commit | 38874b2f2e3a5e0473bada789ef04af632e27ecb (patch) | |
tree | ece6e746005cf77feb3efba46c43029c80d72df2 /mpvcore/playlist.c | |
parent | 7ce464bef9c8ef13ca8343f24d126c468086a60f (diff) | |
download | mpv-38874b2f2e3a5e0473bada789ef04af632e27ecb.tar.bz2 mpv-38874b2f2e3a5e0473bada789ef04af632e27ecb.tar.xz |
playlist: check for NULL on caller site
Letting some playlist functions randomly accept NULL, while others do
not isn't such a good idea.
Diffstat (limited to 'mpvcore/playlist.c')
-rw-r--r-- | mpvcore/playlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mpvcore/playlist.c b/mpvcore/playlist.c index 818aa45a8c..3396a5d78b 100644 --- a/mpvcore/playlist.c +++ b/mpvcore/playlist.c @@ -178,7 +178,7 @@ struct playlist_entry *playlist_get_next(struct playlist *pl, int direction) void playlist_add_base_path(struct playlist *pl, bstr base_path) { - if (!pl || base_path.len == 0 || bstrcmp0(base_path, ".") == 0) + if (base_path.len == 0 || bstrcmp0(base_path, ".") == 0) return; for (struct playlist_entry *e = pl->first; e; e = e->next) { if (!mp_is_url(bstr0(e->filename))) { |