On Tuesday 08 January 2002 12:10 am, you wrote:
> On Mon, Jan 07, 2002 at 06:55:42PM -0500, [EMAIL PROTECTED] wrote:
> 
> > I double-clicked on a choice, to replace bMy with My or some such.
> > 
> > I believe the crash was immediate (the change certainly didn't make it 
> > into the emergency file, but the prior change did.)
> 
> well I don't really see how it could happen, but certainly ther attached
> patch is more robusy.
> 
> please apply
> john

Yuch! I've submitted your patch, but if this is really causing a crash, then 
we should create a little wrapper function for fl_get_browser_line that is 
guaranteed to return a valid string.

I've done that and shoved it in xform_helpers.

Angus

string const getStringFromBrowser(FL_OBJECT * ob, int line)
{
        if (!ob || ob->objclass != FL_BROWSER || 
            line < 1 || line > fl_get_browser_maxline(ob))
                return string();

        char const * tmp = fl_get_browser_line(ob, line);
        return (tmp) ? tmp : string();
}

Reply via email to