Permalink
Browse files

StreamView: fix Coverity ID 1026167, 1026168 Dereference null return …

…value
  • Loading branch information...
Paul Harrison
Paul Harrison committed May 30, 2013
1 parent e437e9a commit 101524d0da7b5a792e40bdc820b99ec1bc41679c
Showing with 8 additions and 5 deletions.
  1. +8 −5 mythplugins/mythmusic/mythmusic/streamview.cpp
@@ -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);
}
}
@@ -402,7 +403,9 @@ void StreamView::doRemoveStream(bool ok)
if (item)
{
MusicMetadata *mdata = qVariantValue<MusicMetadata*> (item->GetData());
deleteStream(mdata);
if (mdata)
deleteStream(mdata);
}
}

0 comments on commit 101524d

Please sign in to comment.