Commit 105bdb33 authored by Cristian Oneț's avatar Cristian Oneț
Browse files

Make sure that the account id is valid before using it in the...

Make sure that the account id is valid before using it in the !isStandardAccount test to prevent an infinite loop.

BUG: 290487
(cherry picked from commit edece5d1)
parent f64fa231
......@@ -83,7 +83,7 @@ void ReportAccount::calculateAccountHierarchy(void)
#else
m_nameHierarchy.prepend(file->account(resultid).name());
#endif
while (!file->isStandardAccount(parentid)) {
while (!parentid.isEmpty() && !file->isStandardAccount(parentid)) {
// take on the identity of our parent
resultid = parentid;
......@@ -307,7 +307,7 @@ ReportAccount ReportAccount::topParent(void) const
QString resultid = id();
QString parentid = parentAccountId();
while (!file->isStandardAccount(parentid)) {
while (!parentid.isEmpty() && !file->isStandardAccount(parentid)) {
// take on the identity of our parent
resultid = parentid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment