diff --git a/YoutubeConfig.json b/YoutubeConfig.json
index 240efbeb1081bfe1b273c74d511ff235801b566a..337fec3f1f5f6c9a8c80eacaec6f340048440cd3 100644
--- a/YoutubeConfig.json
+++ b/YoutubeConfig.json
@@ -7,7 +7,7 @@
 	"sourceUrl": "https://plugins.grayjay.app/Youtube/YoutubeConfig.json",
 	"repositoryUrl": "https://futo.org",
 	"scriptUrl": "./YoutubeScript.js",
-	"version": 119,
+	"version": 123,
 	"iconUrl": "./youtube.png",
 	"id": "35ae969a-a7db-11ed-afa1-0242ac120002",
 
diff --git a/YoutubeScript.js b/YoutubeScript.js
index 26e2ee9eaa51155e7feea16295e139d70b87764c..9f4e8138ebf7406b51c6f869c266f60429b5fafa 100644
--- a/YoutubeScript.js
+++ b/YoutubeScript.js
@@ -2099,7 +2099,7 @@ function extractVideoPage_VideoDetails(initialData, initialPlayerData, contextDa
 	};
 
 	//Adds HLS stream if any other format is not yet available, mostly relevant for recently ended livestreams.
-	if(video.video.videoSources !== null && video.video.videoSources.length == 0 && initialPlayerData.streamingData.hlsManifestUrl)
+	if(video.video.videoSources !== null && video.video.videoSources.length == 0 && initialPlayerData?.streamingData?.hlsManifestUrl)
 	    video.video.videoSources.push(new HLSSource({url: initialPlayerData.streamingData.hlsManifestUrl}));