summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Harrison <pharrison@mythtv.org>2011-03-16 18:41:17 (GMT)
committer Paul Harrison <pharrison@mythtv.org>2011-03-16 18:41:17 (GMT)
commitf1ab9ed9b5af39067e6cdee464ee3f7e94999882 (patch)
tree6b44b76e98c8b23940e27f8f199d60583a03fbd8
parent58c12635d92188381158a120b617c44893aca7cc (diff)
MythUIFileBrowser: Fix a segfault if the 'back' button is missing.
The 'back' button is optional in that dialog so make sure we have one before trying to update it.
-rw-r--r--mythtv/libs/libmythui/mythuifilebrowser.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/mythtv/libs/libmythui/mythuifilebrowser.cpp b/mythtv/libs/libmythui/mythuifilebrowser.cpp
index 4e50c69..ce7d383 100644
--- a/mythtv/libs/libmythui/mythuifilebrowser.cpp
+++ b/mythtv/libs/libmythui/mythuifilebrowser.cpp
@@ -499,10 +499,14 @@ void MythUIFileBrowser::updateRemoteFileList()
item->SetText(QString("0"), "filesize");
item->SetText(m_parentDir, "fullpath");
item->DisplayState(type, "nodetype");
- m_backButton->SetEnabled(true);
+ if (m_backButton)
+ m_backButton->SetEnabled(true);
}
else
- m_backButton->SetEnabled(false);
+ {
+ if (m_backButton)
+ m_backButton->SetEnabled(false);
+ }
QStringList::const_iterator it = slist.begin();
while (it != slist.end())
@@ -667,7 +671,9 @@ void MythUIFileBrowser::updateLocalFileList()
}
}
- m_backButton->SetEnabled(showBackButton);
+ if (m_backButton)
+ m_backButton->SetEnabled(showBackButton);
+
m_locationEdit->SetText(m_subDirectory);
}