FIX: video error message when lan ip missing

Change-Id: I5adaa89e2631a4e7853d806a53f41da927cc0ea7
This commit is contained in:
chunmao.guo 2022-11-08 13:36:28 +08:00 committed by Lane.Wei
parent 9c57c808fa
commit e44e1c1f19
2 changed files with 15 additions and 6 deletions

View file

@ -50,10 +50,11 @@ void wxMediaCtrl2::Load(wxURI url)
}
{
wxRegKey key1(wxRegKey::HKCR, L"CLSID\\" CLSID_BAMBU_SOURCE L"\\InProcServer32");
wxString path = key1.QueryDefaultValue();
wxString path = key1.Exists() ? key1.QueryDefaultValue() : wxString{};
wxRegKey key2(wxRegKey::HKCR, "bambu");
wxString clsid;
key2.QueryRawValue("Source Filter", clsid);
if (key2.Exists())
key2.QueryRawValue("Source Filter", clsid);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": clsid %1% path %2%") % clsid % path;
if (path.empty() || !wxFile::Exists(path) || clsid != CLSID_BAMBU_SOURCE) {