muda
muda copied to clipboard
App crashes when clicking on a menu item on macOS
I added a dummy menu:
fn create_menu() {
let menu = Menu::with_items(&[
&Submenu::with_items(
"",
true,
&[&MenuItem::new(
"Menu item",
true,
Some(Accelerator::new(Some(Modifiers::SUPER), Code::KeyD)),
)],
)
.unwrap(),
])
.unwrap();
menu.init_for_nsapp();
}
to a macOS application which uses winit. However, when I click on the menu item (or any menu item if I add several), the app crashes with
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed
isize::MAX