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 (#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 <noahmgregory@gmail.com>
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