Permalink
Browse files

MythNetvision: Fix segmentation fault in NetTree::showMenu

Fixes #10603

Also removed some unused code.
  • Loading branch information...
1 parent 2d686db commit ba9bcba84c386adc68815c5301f32990872e8e1f @natanojl natanojl committed Apr 15, 2012
@@ -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());
@@ -481,7 +486,6 @@ void NetTree::showMenu(void)
item = qVariantValue<ResultItem *>(node->GetData());
}
-
if (item)
{
if (item->GetDownloadable())
@@ -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();

0 comments on commit ba9bcba

Please sign in to comment.