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:
parent
4a581da6c5
commit
d410b6d13d
1 changed files with 8 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue