diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index b5e1e2950..e00c75f6a 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -5120,6 +5120,9 @@ def __init__(self, extension, /): @classmethod def sanitize_extension(cls, extension, /, *, prepend=False): + if extension is None: + return None + if '/' in extension or '\\' in extension: raise cls(extension)