Avoid deleting last account
This commit is contained in:
@@ -262,6 +262,8 @@ void Database::LoadYear(User* user, int year)
|
||||
if (user->_operations[year] == NULL)
|
||||
user->_operations[year] = new std::map<unsigned int, std::vector<operation> >();
|
||||
|
||||
if (!user->_accounts.size()) return;
|
||||
|
||||
it = user->_accounts.begin();
|
||||
req = _("SELECT * FROM operation WHERE account IN('") + it->id;
|
||||
it++;
|
||||
|
||||
Reference in New Issue
Block a user