1
0
Fork 0
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:
jules 2013-05-25 11:57:28 -07:00
parent 2dc2109876
commit 7452efb9e7
2 changed files with 5 additions and 1 deletions

View file

@ -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;
}

View file

@ -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();