Skip to content

Commit

Permalink
Don't add an invalid (null) image to the image cache
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed Aug 4, 2013
1 parent 53b0212 commit 663cca3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions mythtv/libs/libmythui/mythuiimage.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 663cca3

Please sign in to comment.