[consider merging] Avoid a segfault when changing the default grids.

This commit is contained in:
Matthias Koefferlein 2024-03-24 12:31:44 +01:00
parent 9125ed7035
commit 3b0a34b955
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ CustomizeMenuConfigPage::commit (lay::Dispatcher *dispatcher)
std::map<std::string, std::string>::iterator cb = m_current_bindings.find (kb->first);
if (cb != m_current_bindings.end ()) {
lay::Action *a = dispatcher->menu ()->action (kb->first);
if (cb->second != a->get_default_shortcut ()) {
if (a && cb->second != a->get_default_shortcut ()) {
if (cb->second.empty ()) {
kb->second = lay::Action::no_shortcut ();
} else {