[Gnucash-changes] r14495 - gnucash/trunk/src/register/ledger-core - Avoid crash from opening transaction in more than one register. Bug #347089.

Chris Shoemaker c.shoemaker at cox.net
Sun Jul 16 20:52:13 EDT 2006


On Sun, Jul 16, 2006 at 01:15:54PM -0400, Derek Atkins wrote:
> Chris,
> 
> Chris Shoemaker <chris at cvs.gnucash.org> writes:
> 
> > -
> > -        gnc_suspend_gui_refresh ();
> > -
> > -        info->pending_trans_guid = *xaccTransGetGUID(trans);
> >          if ((pending_trans != NULL) && (pending_trans != trans)) {
> > +            if (gnc_split_register_begin_edit_or_warn(info, trans))
> > +                return TRUE;
> > +
> >              if (xaccTransIsOpen (pending_trans))
> >                  xaccTransCommitEdit (pending_trans);
> >              else g_assert_not_reached();
> > -            g_assert(!xaccTransIsOpen(trans));
> > -            xaccTransBeginEdit(trans);
> >          }
> >          g_assert(xaccTransIsOpen(trans));
> >          pending_trans = trans;
> > +        gnc_suspend_gui_refresh ();
> 
> Are you sure you want to xaccTransCommitEdit() without being inside
> suspend_gui_refresh()?  

I don't see why not.

> I would think that this might cause strange behaviors.  

It might.  What kind of strange behavior did you have in mind?

> Or was that your goal?

No, the goal there was to ensure that the function doesn't return
after the suspend but before the resume.

-chris


More information about the gnucash-devel mailing list