summaryrefslogtreecommitdiff
path: root/libavformat/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/url.c')
-rw-r--r--libavformat/url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/url.c b/libavformat/url.c
index 7cd9e0c705..6956f6dc10 100644
--- a/libavformat/url.c
+++ b/libavformat/url.c
@@ -182,7 +182,7 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
/* Remove the file name from the base url */
sep = strrchr(buf, '/');
- if (sep <= root)
+ if (sep && sep <= root)
sep = root;
if (sep)