Permalink
Browse files

MythBrowser: fix Coverity ID 1026711 Unchecked return value

In MythBrowser::Create(): Value returned from a function is not checked
for errors before being used.
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 3, 2013
1 parent 7a5961f commit 696dd688528d1f8bc31cd9b4e64d11fb7f116245
Showing with 7 additions and 5 deletions.
  1. +7 −5 mythplugins/mythbrowser/mythbrowser/mythbrowser.cpp
@@ -71,12 +71,14 @@ bool MythBrowser::Create(void)
// create the default favicon
QString favIcon = "mb_default_favicon.png";
GetMythUI()->FindThemeFile(favIcon);
if (QFile::exists(favIcon))
if (GetMythUI()->FindThemeFile(favIcon))
{
QImage image(favIcon);
m_defaultFavIcon = GetMythPainter()->GetFormatImage();
m_defaultFavIcon->Assign(image);
if (QFile::exists(favIcon))
{
QImage image(favIcon);
m_defaultFavIcon = GetMythPainter()->GetFormatImage();
m_defaultFavIcon->Assign(image);
}
}
// this is the template for all other browser tabs

0 comments on commit 696dd68

Please sign in to comment.