Permalink
Browse files

Don't add an invalid (null) image to the image cache

  • Loading branch information...
stuartm committed Aug 4, 2013
1 parent 53b0212 commit 663cca3962904732101072f4092b9c99c429588f
Showing with 10 additions and 10 deletions.
  1. +10 −10 mythtv/libs/libmythui/mythuiimage.cpp
@@ -289,6 +289,16 @@ class ImageLoader
}
}
if (image && image->isNull())
{
LOG(VB_GUI | VB_FILE, LOG_INFO,
QString("ImageLoader::LoadImage(%1) Image is NULL")
.arg(filename));
image->DecrRef();
image = NULL;
}
if (image && !bFoundInCache)
{
if (bForceResize)
@@ -328,16 +338,6 @@ class ImageLoader
GetMythUI()->CacheImage(cacheKey, image);
}
if (image && image->isNull())
{
LOG(VB_GUI | VB_FILE, LOG_INFO,
QString("ImageLoader::LoadImage(%1) Image is NULL")
.arg(filename));
image->DecrRef();
image = NULL;
}
if (image)
image->SetChanged();

0 comments on commit 663cca3

Please sign in to comment.