mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
safety-check in Label. Typo fix in MessageManager.
This commit is contained in:
parent
2dc2109876
commit
7452efb9e7
2 changed files with 5 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
|
|||
}
|
||||
JUCE_CATCH_EXCEPTION
|
||||
|
||||
if (millisecondsToRunFor >= 0 && Time::currentTimeMillis() >= currentTime)
|
||||
if (millisecondsToRunFor >= 0 && Time::currentTimeMillis() >= endTime)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -209,6 +209,10 @@ void Label::showEditor()
|
|||
editor->setText (getText(), false);
|
||||
editor->addListener (this);
|
||||
editor->grabKeyboardFocus();
|
||||
|
||||
if (editor == nullptr) // may be deleted by a callback
|
||||
return;
|
||||
|
||||
editor->setHighlightedRegion (Range<int> (0, textValue.toString().length()));
|
||||
|
||||
resized();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue