Check useCache() before using pixmapCache that could be not instantiated.

svn path=/trunk/KDE/kdelibs/; revision=947031
This commit is contained in:
Arthur Renato Mello 2009-03-30 19:46:01 +00:00
parent bc01148110
commit 6c5889f323

View File

@ -604,7 +604,7 @@ bool Theme::findInCache(const QString &key, QPixmap &pix)
// BIC FIXME: Should be merged with the other findInCache method above when we break BC
bool Theme::findInCache(const QString &key, QPixmap &pix, unsigned int lastModified)
{
if (lastModified > d->pixmapCache->timestamp()) {
if (d->useCache() && lastModified > d->pixmapCache->timestamp()) {
d->discardCache();
}