mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Assorted threading and undefined behaviour fixes
This commit is contained in:
parent
36da4cde05
commit
8cecf0baf9
12 changed files with 121 additions and 42 deletions
|
|
@ -177,6 +177,8 @@ public:
|
|||
|
||||
void paintItem (Graphics& g, int width, int height) override
|
||||
{
|
||||
ScopedLock lock (iconUpdate);
|
||||
|
||||
if (file != File())
|
||||
{
|
||||
updateIcon (true);
|
||||
|
|
@ -229,6 +231,7 @@ private:
|
|||
OptionalScopedPointer<DirectoryContentsList> subContentsList;
|
||||
bool isDirectory;
|
||||
TimeSliceThread& thread;
|
||||
CriticalSection iconUpdate;
|
||||
Image icon;
|
||||
String fileSize, modTime;
|
||||
|
||||
|
|
@ -249,7 +252,11 @@ private:
|
|||
|
||||
if (im.isValid())
|
||||
{
|
||||
icon = im;
|
||||
{
|
||||
ScopedLock lock (iconUpdate);
|
||||
icon = im;
|
||||
}
|
||||
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue