diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index 6063064f9..99e8535a7 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -162,10 +162,12 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { std::string manifest_data; if (!base::ReadFileToString(manifest_path, &manifest_data)) return false; - std::unique_ptr manifest_value(base::Value::ToUniquePtrValue( - std::move(base::JSONReader::Read(manifest_data, - base::JSON_ALLOW_TRAILING_COMMAS) - .value()))); + auto json_manifest_value = + base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS); + if (!json_manifest_value.has_value()) + return false; + std::unique_ptr manifest_value( + base::Value::ToUniquePtrValue(std::move(json_manifest_value.value()))); if (!manifest_value.get()) return false; base::DictionaryValue* manifest = nullptr;