mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fix core dump
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1038 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e84ce56f03
commit
57c974b88a
@ -331,6 +331,9 @@ xaccSRLoadTransEntry (SplitRegister *reg, Split *split, int do_commit)
|
|||||||
time_t secs;
|
time_t secs;
|
||||||
double baln;
|
double baln;
|
||||||
|
|
||||||
|
/* don't even bother doing a load if there is no current cursor */
|
||||||
|
if (!(reg->table->current_cursor)) return;
|
||||||
|
|
||||||
if (!split) {
|
if (!split) {
|
||||||
/* we interpret a NULL split as a blank split */
|
/* we interpret a NULL split as a blank split */
|
||||||
xaccSetDateCellValueSecs (reg->dateCell, 0);
|
xaccSetDateCellValueSecs (reg->dateCell, 0);
|
||||||
@ -402,6 +405,9 @@ xaccSRLoadSplitEntry (SplitRegister *reg, Split *split, int do_commit)
|
|||||||
{
|
{
|
||||||
char buff[2];
|
char buff[2];
|
||||||
|
|
||||||
|
/* don't even bother doing a load if there is no current cursor */
|
||||||
|
if (!(reg->table->current_cursor)) return;
|
||||||
|
|
||||||
if (!split) {
|
if (!split) {
|
||||||
/* we interpret a NULL split as a blank split */
|
/* we interpret a NULL split as a blank split */
|
||||||
xaccSetComboCellValue (reg->actionCell, "");
|
xaccSetComboCellValue (reg->actionCell, "");
|
||||||
@ -664,7 +670,7 @@ printf ("load split %d at phys row %d \n", j, phys_row);
|
|||||||
/* do the transaction row of the blank split */
|
/* do the transaction row of the blank split */
|
||||||
xaccSetCursor (table, reg->trans_cursor, phys_row, 0, vrow, 0);
|
xaccSetCursor (table, reg->trans_cursor, phys_row, 0, vrow, 0);
|
||||||
xaccMoveCursor (table, phys_row, 0);
|
xaccMoveCursor (table, phys_row, 0);
|
||||||
xaccSRLoadRegEntry (reg, split);
|
xaccSRLoadTransEntry (reg, split, 1);
|
||||||
vrow ++;
|
vrow ++;
|
||||||
phys_row += reg->trans_cursor->numRows;
|
phys_row += reg->trans_cursor->numRows;
|
||||||
|
|
||||||
@ -675,7 +681,7 @@ printf ("load split %d at phys row %d \n", j, phys_row);
|
|||||||
split = xaccTransGetSplit (trans, 1);
|
split = xaccTransGetSplit (trans, 1);
|
||||||
xaccSetCursor (table, reg->split_cursor, phys_row, 0, vrow, 0);
|
xaccSetCursor (table, reg->split_cursor, phys_row, 0, vrow, 0);
|
||||||
xaccMoveCursor (table, phys_row, 0);
|
xaccMoveCursor (table, phys_row, 0);
|
||||||
xaccSRLoadRegEntry (reg, split);
|
xaccSRLoadSplitEntry (reg, split, 1);
|
||||||
vrow ++;
|
vrow ++;
|
||||||
phys_row += reg->split_cursor->numRows;
|
phys_row += reg->split_cursor->numRows;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user