From 173d0d16dc5e6aa50f2d12aadbe99108a199909a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:00:38 -0500 Subject: [PATCH] fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49483) 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 a35aa15087..400a69e4a1 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); }