From 1c38654321dc1a412d2462cb46a150143d170b05 Mon Sep 17 00:00:00 2001 From: lyc <22719973+l-yc@users.noreply.github.com> Date: Sat, 30 Nov 2019 14:36:22 +0800 Subject: [PATCH] Fixed bug in loading libcanberra when falling back on alternative library names --- kitty/desktop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/desktop.c b/kitty/desktop.c index 5084ad279..1a788ed51 100644 --- a/kitty/desktop.c +++ b/kitty/desktop.c @@ -113,8 +113,8 @@ load_libcanberra(void) { if (done) return; done = true; libcanberra_handle = dlopen(libname, RTLD_LAZY); - if (libcanberra_handle == NULL) libsn_handle = dlopen(libname2, RTLD_LAZY); - if (libcanberra_handle == NULL) libsn_handle = dlopen(libname3, RTLD_LAZY); + if (libcanberra_handle == NULL) libcanberra_handle = dlopen(libname2, RTLD_LAZY); + if (libcanberra_handle == NULL) libcanberra_handle = dlopen(libname3, RTLD_LAZY); if (libcanberra_handle == NULL) { fprintf(stderr, "Failed to load %s, cannot play beep sound, with error: %s\n", libname, dlerror()); return;