fix for a core dump

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@664 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-03-18 07:44:29 +00:00
parent 69009d1d3b
commit 4891cfb7d8
3 changed files with 6 additions and 4 deletions

View File

@ -369,6 +369,7 @@ void xaccInitBasicRegister (BasicRegister *reg, int type)
/* -------------------------------- */
table = xaccMallocTable ();
xaccSetTableSize (table, header->numRows, header->numCols, 1, 1);
xaccSetCursor (table, header, 0, 0, 0, 0);
reg->table = table;
}

View File

@ -89,6 +89,7 @@
} else { \
type ***old_entries; \
\
/* if we are here, there are more new than old rows */ \
if (old_cols >= new_cols) { \
\
/* new table has fewer columns. */ \

View File

@ -68,10 +68,10 @@ xaccInitTable (Table * table)
table->table_widget = 0;
table->next_tab_group = 0;
table->num_phys_rows = 0;
table->num_phys_cols = 0;
table->num_virt_rows = 0;
table->num_virt_cols = 0;
table->num_phys_rows = -1;
table->num_phys_cols = -1;
table->num_virt_rows = -1;
table->num_virt_cols = -1;
table->current_cursor = NULL;
table->current_cursor_virt_row = -1;