Avoid deleting last account

This commit is contained in:
2010-07-03 09:52:44 +02:00
parent e08865e01f
commit 4c3f2cc209
2 changed files with 8 additions and 1 deletions

View File

@@ -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++;