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:44:38 (GMT)
commit1f532a5cfbb9194000756b1248ee3d1af7487539 (patch)
treeb44fba34bb9dd34313a04af352900c9eeaa79fed
parentae52b5874fbd8dd9e8dfc475c8e9c0a97c2eb12f (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. (cherry picked from commit f1ab9ed9b5af39067e6cdee464ee3f7e94999882)
-rw-r--r--mythtv/libs/libmyth/mythuifilebrowser.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/mythtv/libs/libmyth/mythuifilebrowser.cpp b/mythtv/libs/libmyth/mythuifilebrowser.cpp
index 4e50c69..ce7d383 100644
--- a/mythtv/libs/libmyth/mythuifilebrowser.cpp
+++ b/mythtv/libs/libmyth/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);
}