Permalink
Browse files

If we fail to load the image then report that we failed

  • Loading branch information...
stuartm committed Aug 4, 2013
1 parent 0cb3f83 commit 53b0212ef36606daee4f46ebebae6097b8b9d07f
Showing with 8 additions and 8 deletions.
  1. +8 −8 mythtv/libs/libmythui/mythuihelper.cpp
@@ -1357,17 +1357,17 @@ QImage *MythUIHelper::LoadScaleImage(QString filename, bool fromcache)
tmpimage.load(filename);
}
if (width != d->m_baseWidth || height != d->m_baseHeight)
if (tmpimage.isNull())
{
if (tmpimage.isNull())
{
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("LoadScaleImage(%1) failed to load image")
.arg(filename));
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("LoadScaleImage(%1) failed to load image")
.arg(filename));
return NULL;
}
return NULL;
}
if (width != d->m_baseWidth || height != d->m_baseHeight)
{
QImage tmp2 = tmpimage.scaled(
(int)(tmpimage.width() * wmult),
(int)(tmpimage.height() * hmult),

0 comments on commit 53b0212

Please sign in to comment.