From e555e520d3be1e3267e01e51f7eda014bea7c88b Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:32:47 +0100 Subject: [PATCH] fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49482) fix: return early from beep on linux if there is no default gdk display Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Noah Gregory --- shell/common/platform_util_linux.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index b5cedcff0a..aa9104b288 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -406,6 +406,8 @@ bool PlatformTrashItem(const base::FilePath& full_path, std::string* error) { void Beep() { auto* display = gdk_display_get_default(); + if (!display) + return; gdk_display_beep(display); }