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:
parent
3d97343c2a
commit
d5373eed02
1 changed files with 5 additions and 0 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue