diff --git a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp index 0ae6c52638..b37a981269 100644 --- a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp +++ b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp @@ -81,6 +81,12 @@ void KeyPressMappingSet::addKeyPress (const CommandID commandID, const KeyPress& mappings.add (cm); sendChangeMessage(); } + else + { + // If you hit this, you're trying to attach a keypress to a command ID that + // doesn't exist, so the key is not being attached. + jassertfalse; + } } } }