From bbdd9486e4d6ffe60e698f47189eef7d296f0695 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Sun, 31 May 1998 00:22:55 +0000 Subject: [PATCH] some minor bug patches git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@855 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/register.c | 3 +++ src/register/table-allgui.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/register/register.c b/src/register/register.c index 393225bb11..653b201663 100644 --- a/src/register/register.c +++ b/src/register/register.c @@ -30,6 +30,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * \********************************************************************/ +#ifdef COMPILATION_UNIT_IS_EMPTY_DUUDE + #include #include "messages.h" @@ -485,5 +487,6 @@ xaccGetChangeFlag (BasicRegister *reg) return changed; } +#endif /* COMPILATION_UNIT_IS_EMPTY_DUUDE */ /* ============ END OF FILE ===================== */ diff --git a/src/register/table-allgui.c b/src/register/table-allgui.c index cb4a2759c5..1952fddaf7 100644 --- a/src/register/table-allgui.c +++ b/src/register/table-allgui.c @@ -197,8 +197,13 @@ xaccTableResize (Table * table, int new_phys_rows, int new_phys_cols, int new_virt_rows, int new_virt_cols) { - /* hack alert -- should check to make sure that no null pointers - * or bad values were passed in ... */ + if (!table) return; + if ((new_phys_rows < new_virt_rows) || + (new_phys_cols < new_virt_cols)) { + printf ("Internal Error: xaccTableResize(): the number of " + "physical rows must equal or exceed the number of virtual rows \n"); + exit (1); + } /* resize the string data array */ RESIZE_ARR ((table->num_phys_rows),