1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Projucer: Fixed a crash that could occur when saving a project multiple times

This commit is contained in:
ed 2017-11-24 09:26:24 +00:00
parent 472c5616d4
commit b288da58f0
4 changed files with 19 additions and 3 deletions

View file

@ -928,6 +928,10 @@ void Project::Item::setID (const String& newID) { state.setProperty (Ids::ID,
Drawable* Project::Item::loadAsImageFile() const
{
const MessageManagerLock mml (ThreadPoolJob::getCurrentThreadPoolJob());
if (! mml.lockWasGained())
return nullptr;
return isValid() ? Drawable::createFromImageFile (getFile())
: nullptr;
}