Permalink
Browse files

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 f1ab9ed)
  • Loading branch information...
Paul Harrison
Paul Harrison committed Mar 16, 2011
1 parent ae52b58 commit 1f532a5cfbb9194000756b1248ee3d1af7487539
Showing with 9 additions and 3 deletions.
  1. +9 −3 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);
}

0 comments on commit 1f532a5

Please sign in to comment.