Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavutil/avstring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/avstring.c b/libavutil/avstring.c
index 2071dd36a5..8702fe0455 100644
--- a/libavutil/avstring.c
+++ b/libavutil/avstring.c
@@ -299,7 +299,7 @@ char *av_append_path_component(const char *path, const char 
*component)
     char *fullpath;
 
     if (!path)
-        return av_strdup(component);
+        return component ? av_strdup(component) : NULL;
     if (!component)
         return av_strdup(path);
 
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to