Skip to content

Commit

Permalink
Fix a segfault in MythUIHelper::LoadCacheImage()
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Aug 19, 2011
1 parent 4bc24ed commit 5655302
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mythtv/libs/libmythui/mythuihelper.cpp
Expand Up @@ -1443,6 +1443,9 @@ MythImage *MythUIHelper::LoadCacheImage(QString srcfile, QString label,
// seconds.
const uint kImageCacheTimeout = 5;
uint now = QDateTime::currentDateTime().toTime_t();

QMutexLocker locker(d->m_cacheLock);

if (d->imageCache.contains(label) &&
d->CacheTrack[label] + kImageCacheTimeout > now)
{
Expand Down

0 comments on commit 5655302

Please sign in to comment.