diff --git a/libcef/common/alloy/alloy_content_client.cc b/libcef/common/alloy/alloy_content_client.cc index c572aacfc..8cbe490c2 100644 --- a/libcef/common/alloy/alloy_content_client.cc +++ b/libcef/common/alloy/alloy_content_client.cc @@ -158,10 +158,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;