Update shell/common/platform_util_linux.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
Shelley Vohr
2021-06-10 18:36:36 +02:00
committed by GitHub
parent fcef5a5333
commit 0ece28ff3e

View File

@@ -131,9 +131,7 @@ bool XDGUtil(const std::vector<std::string>& argv,
// AlterEnvironment().
const absl::optional<std::string>& gdk_backend =
electron::ElectronBrowserMainParts::GetGDKBackend();
options.environment["GDK_BACKEND"] = gdk_backend.has_value()
? gdk_backend.value().c_str()
: base::NativeEnvironmentString();
options.environment["GDK_BACKEND"] = gdk_backend ? *gdk_backend : std::string{};
base::Process process = base::LaunchProcess(argv, options);
if (!process.IsValid())