1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

Avoided a possible null pointer in KeyMappingEditorComponent

This commit is contained in:
jules 2016-03-15 10:20:58 +00:00
parent 4a581da6c5
commit d410b6d13d

View file

@ -176,13 +176,16 @@ public:
static void keyChosen (int result, ChangeKeyButton* button)
{
if (result != 0 && button != nullptr && button->currentKeyEntryWindow != nullptr)
if (button != nullptr && button->currentKeyEntryWindow != nullptr)
{
button->currentKeyEntryWindow->setVisible (false);
button->setNewKey (button->currentKeyEntryWindow->lastPress, false);
}
if (result != 0)
{
button->currentKeyEntryWindow->setVisible (false);
button->setNewKey (button->currentKeyEntryWindow->lastPress, false);
}
button->currentKeyEntryWindow = nullptr;
button->currentKeyEntryWindow = nullptr;
}
}
void assignNewKey()