Git commit 5cee224d7c23ff6bfaedb9a35b8b88ba82fe5368 by Alvaro Soliverez. Committed on 27/04/2012 at 23:41. Pushed by asoliverez into branch 'master'. Make sure a split is selected when constructing the split table of a report BUG:296723 REVIEW:104765 M +7 -0 kmymoney/reports/querytable.cpp http://commits.kde.org/kmymoney/5cee224d7c23ff6bfaedb9a35b8b88ba82fe5368 diff --git a/kmymoney/reports/querytable.cpp b/kmymoney/reports/querytable.= cpp index 4108144..c418f29 100644 --- a/kmymoney/reports/querytable.cpp +++ b/kmymoney/reports/querytable.cpp @@ -1238,6 +1238,13 @@ void QueryTable::constructSplitsTable(void) loan_special_case =3D splitAcc.isLoan(); } = + // There is a slight chance that at this point myBegin is still pointi= ng to splits.end() if the + // transaction only has income and expense splits (which should not ha= ppen). In that case, point + // it to the first split + if (myBegin =3D=3D splits.end()) { + myBegin =3D splits.begin(); + } + //the account of the beginning splits ReportAccount myBeginAcc =3D (*myBegin).accountId(); =20