Skip to content

Commit

Permalink
Frontend-GNOME: handle DllNotFoundException in MenuWidget on macOS
Browse files Browse the repository at this point in the history
The Mono runtime on macOS might not have the libigemacintegration.dylib
library present at all, which then leads to the DllNotFoundException.

Instead of crashing we handle that exception the same way as
EntryPointNotFoundException and gracefully continue.
  • Loading branch information
meebey committed May 6, 2023
1 parent 6cd7b4f commit 47f5572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Frontend-GNOME/Views/MenuWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public MenuWidget(Gtk.Window parent, ChatViewManager chatViewManager)
f_SmuxiAction.Visible = false;
// About item is already shown in app menu
f_AboutAction.Visible = false;
} catch (EntryPointNotFoundException ex) {
f_Logger.Error("Failed to initialize mac menu integration, disabling mac menu integration", ex);
} catch (Exception ex) when (ex is DllNotFoundException || ex is EntryPointNotFoundException) {
f_Logger.Error("Failed to initialize macOS menu integration, disabling integration...", ex);
}
}
}
Expand Down

0 comments on commit 47f5572

Please sign in to comment.