Fix for issue 298 on behalf of Steve Herrell

This commit is contained in:
Wyatt Olson
2010-11-04 17:50:32 -06:00
parent 37b16e504f
commit 0d60fb4028

View File

@@ -253,15 +253,18 @@ void Thumbnail::increaseRef ()
void Thumbnail::decreaseRef ()
{
Glib::Mutex::Lock lock(mutex);
if ( ref != 0 )
{
--ref;
Glib::Mutex::Lock lock(mutex);
if ( ref == 0 )
{
cachemgr->closeThumbnail (this);
return;
}
if ( --ref != 0 )
{
return;
}
}
cachemgr->closeThumbnail (this);
}
void Thumbnail::getThumbnailSize (int &w, int &h) {