Skip to content

Commit

Permalink
StreamView: fix Coverity ID 1026167, 1026168 Dereference null return …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
Paul Harrison committed May 30, 2013
1 parent e437e9a commit 101524d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions mythplugins/mythmusic/mythmusic/streamview.cpp
Expand Up @@ -386,10 +386,11 @@ void StreamView::removeStream(void)
{
MusicMetadata *mdata = qVariantValue<MusicMetadata*> (item->GetData());

ShowOkPopup(tr("Are you sure you want to delete this Stream?\n"
"Station: %1 - Channel: %2")
.arg(mdata->Station()).arg(mdata->Channel()),
this, SLOT(doRemoveStream(bool)), true);
if (mdata)
ShowOkPopup(tr("Are you sure you want to delete this Stream?\n"
"Station: %1 - Channel: %2")
.arg(mdata->Station()).arg(mdata->Channel()),
this, SLOT(doRemoveStream(bool)), true);
}
}

Expand All @@ -402,7 +403,9 @@ void StreamView::doRemoveStream(bool ok)
if (item)
{
MusicMetadata *mdata = qVariantValue<MusicMetadata*> (item->GetData());
deleteStream(mdata);

if (mdata)
deleteStream(mdata);
}
}

Expand Down

0 comments on commit 101524d

Please sign in to comment.