diff --git a/examples/GUI/OpenGLDemo.h b/examples/GUI/OpenGLDemo.h index dfba6b02f8..1e7f5606b7 100644 --- a/examples/GUI/OpenGLDemo.h +++ b/examples/GUI/OpenGLDemo.h @@ -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); }