mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-13 16:30:29 -05:00
prevent crash with empty database
This commit is contained in:
parent
5718f3dca2
commit
7e54bd4956
@ -60,6 +60,11 @@ DetailsWidget::~DetailsWidget()
|
||||
|
||||
void DetailsWidget::getSelectedEntry(Entry* selectedEntry)
|
||||
{
|
||||
if (!selectedEntry) {
|
||||
hideDetails();
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentEntry = selectedEntry;
|
||||
|
||||
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
||||
@ -185,6 +190,11 @@ void DetailsWidget::getSelectedEntry(Entry* selectedEntry)
|
||||
|
||||
void DetailsWidget::getSelectedGroup(Group* selectedGroup)
|
||||
{
|
||||
if (!selectedGroup) {
|
||||
hideDetails();
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentGroup = selectedGroup;
|
||||
|
||||
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
||||
|
Loading…
Reference in New Issue
Block a user