summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonatan Lindblad <jlindblad@mythtv.org>2012-04-15 10:22:32 (GMT)
committer Jonatan Lindblad <jlindblad@mythtv.org>2012-04-15 10:22:32 (GMT)
commitba9bcba84c386adc68815c5301f32990872e8e1f (patch)
treeedd2f79c9a246de09c434c13d0dd4bf1490e34b4
parent2d686dbd3523956275fb9e989bd1eefe5e07623e (diff)
MythNetvision: Fix segmentation fault in NetTree::showMenu
Fixes #10603 Also removed some unused code.
-rw-r--r--mythplugins/mythnetvision/mythnetvision/nettree.cpp8
-rw-r--r--mythplugins/mythnetvision/mythnetvision/rsseditor.cpp6
2 files changed, 6 insertions, 8 deletions
diff --git a/mythplugins/mythnetvision/mythnetvision/nettree.cpp b/mythplugins/mythnetvision/mythnetvision/nettree.cpp
index d07765f..49efc8b 100644
--- a/mythplugins/mythnetvision/mythnetvision/nettree.cpp
+++ b/mythplugins/mythnetvision/mythnetvision/nettree.cpp
@@ -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())
diff --git a/mythplugins/mythnetvision/mythnetvision/rsseditor.cpp b/mythplugins/mythnetvision/mythnetvision/rsseditor.cpp
index 93d87d2..3035816 100644
--- a/mythplugins/mythnetvision/mythnetvision/rsseditor.cpp
+++ b/mythplugins/mythnetvision/mythnetvision/rsseditor.cpp
@@ -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();