Skip to content

Commit

Permalink
MythBrowser: fix Coverity ID 1026711 Unchecked return value
Browse files Browse the repository at this point in the history
In MythBrowser::Create(): Value returned from a function is not checked
for errors before being used.
  • Loading branch information
Paul Harrison committed Jun 3, 2013
1 parent 7a5961f commit 696dd68
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mythplugins/mythbrowser/mythbrowser/mythbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 696dd68

Please sign in to comment.