mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Take the MessageManagerLock before calling Graphics::drawFittedText() in the OpenGL demo to avoid hitting an assertion
This commit is contained in:
parent
e68fc5e70e
commit
dc9a0b39b8
1 changed files with 5 additions and 0 deletions
|
|
@ -282,6 +282,11 @@ struct OpenGLDemoClasses
|
|||
|
||||
g.setColour (Colours::black);
|
||||
g.setFont (40);
|
||||
|
||||
const MessageManagerLock mml (ThreadPoolJob::getCurrentThreadPoolJob());
|
||||
if (! mml.lockWasGained())
|
||||
return false;
|
||||
|
||||
g.drawFittedText (String (Time::getCurrentTime().getMilliseconds()), image.getBounds(), Justification::centred, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue