From 534cb33465a54b454c2934147e79fdefc94cac6b Mon Sep 17 00:00:00 2001 From: Noah Gregory Date: Wed, 21 Jan 2026 15:55:24 -0500 Subject: [PATCH] fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49442) fix: return early from beep on linux if there is no default gdk display --- 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); }