mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-29 17:48:46 -04:00
Merge pull request #1145 from keepassxreboot/hotfix/prevent_crash_empty_database
Prevent crash with empty database
This commit is contained in:
commit
e100ba8362
1 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,11 @@ DetailsWidget::~DetailsWidget()
|
||||||
|
|
||||||
void DetailsWidget::getSelectedEntry(Entry* selectedEntry)
|
void DetailsWidget::getSelectedEntry(Entry* selectedEntry)
|
||||||
{
|
{
|
||||||
|
if (!selectedEntry) {
|
||||||
|
hideDetails();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_currentEntry = selectedEntry;
|
m_currentEntry = selectedEntry;
|
||||||
|
|
||||||
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
||||||
|
@ -185,6 +190,11 @@ void DetailsWidget::getSelectedEntry(Entry* selectedEntry)
|
||||||
|
|
||||||
void DetailsWidget::getSelectedGroup(Group* selectedGroup)
|
void DetailsWidget::getSelectedGroup(Group* selectedGroup)
|
||||||
{
|
{
|
||||||
|
if (!selectedGroup) {
|
||||||
|
hideDetails();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_currentGroup = selectedGroup;
|
m_currentGroup = selectedGroup;
|
||||||
|
|
||||||
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
if (!config()->get("GUI/HideDetailsView").toBool()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue