Fix crash on invalid chromeMediaSourceId (fixes #3911)

This commit is contained in:
Marshall Greenblatt
2025-03-31 12:11:33 -04:00
parent 0bf995ae26
commit b2f5ab6cd2

View File

@ -215,8 +215,10 @@ class CefMediaAccessQuery {
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
-1 /* webrtc::kFullDesktopScreenId */); -1 /* webrtc::kFullDesktopScreenId */);
} }
video_devices.emplace_back(request_.video_type, media_id.ToString(), if (media_id.type != content::DesktopMediaID::TYPE_NONE) {
"Screen"); video_devices.emplace_back(request_.video_type, media_id.ToString(),
"Screen");
}
} }
blink::mojom::StreamDevicesSetPtr stream_devices_set = blink::mojom::StreamDevicesSetPtr stream_devices_set =