mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user