Skip to content

Commit

Permalink
MythNetvision: Fix segmentation fault in NetTree::showMenu
Browse files Browse the repository at this point in the history
Fixes #10603

Also removed some unused code.
  • Loading branch information
natanojl committed Apr 15, 2012
1 parent 2d686db commit ba9bcba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 6 additions & 2 deletions mythplugins/mythnetvision/mythnetvision/nettree.cpp
Expand Up @@ -472,7 +472,12 @@ void NetTree::showMenu(void)

ResultItem *item = NULL;
if (m_type == DLG_TREE)
item = qVariantValue<ResultItem *>(m_siteMap->GetCurrentNode()->GetData());
{
MythGenericTree *node = m_siteMap->GetCurrentNode();

if (node)
item = qVariantValue<ResultItem *>(node->GetData());
}
else
{
MythGenericTree *node = GetNodePtrFromButton(m_siteButtonList->GetItemCurrent());
Expand All @@ -481,7 +486,6 @@ void NetTree::showMenu(void)
item = qVariantValue<ResultItem *>(node->GetData());
}


if (item)
{
if (item->GetDownloadable())
Expand Down
6 changes: 0 additions & 6 deletions mythplugins/mythnetvision/mythnetvision/rsseditor.cpp
Expand Up @@ -223,12 +223,6 @@ void RSSEditPopup::slotSave(QNetworkReply* reply)
QString author = m_authorEdit->GetText();
QString file = m_thumbImage->GetFilename();

bool download;
if (m_download->GetCheckState() == MythUIStateType::Full)
download = true;
else
download = false;

LOG(VB_GENERAL, LOG_DEBUG, QString("Text to Parse: %1").arg(text));

QDomElement root = document.documentElement();
Expand Down

0 comments on commit ba9bcba

Please sign in to comment.