1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Partially revert 8ce68447

When loading exporter icons on a background save thread we need to take the MessageManagerLock as the image file may be an SVG which has a message thread dependency in the Drawable parsing code
This commit is contained in:
ed 2021-07-15 09:05:18 +01:00
parent 3d97343c2a
commit d5373eed02

View file

@ -1548,6 +1548,11 @@ void Project::Item::setID (const String& newID) { state.setProperty (Ids::ID,
std::unique_ptr<Drawable> Project::Item::loadAsImageFile() const
{
const MessageManagerLock mml (ThreadPoolJob::getCurrentThreadPoolJob());
if (! mml.lockWasGained())
return nullptr;
if (isValid())
return Drawable::createFromImageFile (getFile());