From 06fdee87b3fb2ce7a5ad730b2397bee00e289f1d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 11:07:47 +0100 Subject: [PATCH] fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49484) 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); }