diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-10-28 18:27:13 +0200 |
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-10-28 18:27:13 +0200 |
| commit | 8ccf79735ec399cc6b88f25cd2ceafac6858ecd2 (patch) | |
| tree | ea57c4c7ec66fc97e75824e082d542d462ee856f /indra/newview/llkeyconflict.cpp | |
| parent | 317dd0e405dfb6ca813118c556f5c23af27cd2a7 (diff) | |
SL-6109 Fixed conflict resolution issue caused by menu accelerators
Diffstat (limited to 'indra/newview/llkeyconflict.cpp')
| -rw-r--r-- | indra/newview/llkeyconflict.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp index 71ba0d37b3..fcf1a7953c 100644 --- a/indra/newview/llkeyconflict.cpp +++ b/indra/newview/llkeyconflict.cpp @@ -174,17 +174,23 @@ bool LLKeyConflictHandler::canAssignControl(const std::string &control_name) // static bool LLKeyConflictHandler::isReservedByMenu(const KEY &key, const MASK &mask) { - return gMenuBarView->hasAccelerator(key, mask) || gLoginMenuBarView->hasAccelerator(key, mask); + if (key == KEY_NONE) + { + return false; + } + return (gMenuBarView && gMenuBarView->hasAccelerator(key, mask)) + || (gLoginMenuBarView && gLoginMenuBarView->hasAccelerator(key, mask)); } // static bool LLKeyConflictHandler::isReservedByMenu(const LLKeyData &data) { - if (data.mMouse != CLICK_NONE) + if (data.mMouse != CLICK_NONE || data.mKey == KEY_NONE) { return false; } - return gMenuBarView->hasAccelerator(data.mKey, data.mMask) || gLoginMenuBarView->hasAccelerator(data.mKey, data.mMask); + return (gMenuBarView && gMenuBarView->hasAccelerator(data.mKey, data.mMask)) + || (gLoginMenuBarView && gLoginMenuBarView->hasAccelerator(data.mKey, data.mMask)); } bool LLKeyConflictHandler::registerControl(const std::string &control_name, U32 index, EMouseClickType mouse, KEY key, MASK mask, bool ignore_mask) |
