Skip to content

Commit

Permalink
MythUIFileBrowser: Fix a segfault if the 'back' button is missing.
Browse files Browse the repository at this point in the history
The 'back' button is optional in that dialog so make sure we have one before
trying to update it.
  • Loading branch information
Paul Harrison committed Mar 16, 2011
1 parent 58c1263 commit f1ab9ed
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mythtv/libs/libmythui/mythuifilebrowser.cpp
Expand Up @@ -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())
Expand Down Expand Up @@ -667,7 +671,9 @@ void MythUIFileBrowser::updateLocalFileList()
}
}

m_backButton->SetEnabled(showBackButton);
if (m_backButton)
m_backButton->SetEnabled(showBackButton);

m_locationEdit->SetText(m_subDirectory);
}

Expand Down

0 comments on commit f1ab9ed

Please sign in to comment.