fix potential crashes when database has been closed and recreating activities
This commit is contained in:
@@ -189,13 +189,12 @@ namespace keepass2android
|
||||
PwUuid id = RetrieveGroupId (intent);
|
||||
|
||||
Database db = App.Kp2a.CurrentDb;
|
||||
if (id == null) {
|
||||
Group = db.Root;
|
||||
} else {
|
||||
Group = db.GroupsById[id];
|
||||
}
|
||||
|
||||
Log.Warn (Tag, "Retrieved group");
|
||||
if (db != null)
|
||||
{
|
||||
Group = id == null ? db.Root : db.GroupsById[id];
|
||||
}
|
||||
|
||||
Log.Warn (Tag, "Retrieved group");
|
||||
if (Group == null) {
|
||||
Log.Warn (Tag, "Group was null");
|
||||
return;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace keepass2android
|
||||
Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
|
||||
}
|
||||
|
||||
_ioc = App.Kp2a.GetDbForQuickUnlock().Ioc;
|
||||
_ioc = App.Kp2a.GetDbForQuickUnlock()?.Ioc;
|
||||
|
||||
if (_ioc == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user