Re: [evolution-patches] Prevent mailer crash on exit



Committed.

On Thu, 2003-05-08 at 13:40, Jeffrey Stedfast wrote:
> sure, looks good.
> 
> Jeff
> 
> On Thu, 2003-05-08 at 10:20, Ettore Perazzoli wrote:
> > I just found this while using Alleyoop.  If you quit Evolution while the
> > password dialog is already up, the dialog's widget gets destroyed but
> > the corresponding pointer doesnt get cleared, which causes the code to
> > access garbage memory.
> > 
> > -- Ettore
> > 
> > ______________________________________________________________________
> > Index: ChangeLog
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
> > retrieving revision 1.2715
> > diff -u -p -r1.2715 ChangeLog
> > --- ChangeLog	6 May 2003 00:04:00 -0000	1.2715
> > +++ ChangeLog	8 May 2003 14:10:06 -0000
> > @@ -1,3 +1,10 @@
> > +2003-05-08  Ettore Perazzoli  <ettore ximian com>
> > +
> > +	* mail-session.c (request_password): Make sure password_dialog is
> > +	NULLified when the dialog is destroyed in any case, using
> > +	g_object_add_weak_pointer().  Prevents a crash that could happen
> > +	if the shell would quit with the password dialog still up.
> > +
> >  2003-05-05  Not Zed  <NotZed Ximian com>
> >  
> >  	** See bug #42294.
> > Index: mail-session.c
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/mail/mail-session.c,v
> > retrieving revision 1.65
> > diff -u -p -r1.65 mail-session.c
> > --- mail-session.c	5 May 2003 18:08:49 -0000	1.65
> > +++ mail-session.c	8 May 2003 14:10:07 -0000
> > @@ -225,7 +225,7 @@ pass_response (GtkDialog *dialog, int bu
> >  		camel_exception_set (m->ex, CAMEL_EXCEPTION_USER_CANCEL, _("User canceled operation."));
> >  		break;
> >  	}
> > -	
> > +
> >  	gtk_widget_destroy ((GtkWidget *) dialog);
> >  	
> >  	password_dialog = NULL;
> > @@ -985,6 +985,7 @@ mail_session_set_interactive (gboolean i
> >  		if (password_dialog) {
> >  			d(printf ("Destroying password dialogue\n"));
> >  			gtk_widget_destroy ((GtkWidget *) password_dialog);
> > +			password_dialog =  NULL;
> >  		}
> >  		
> >  		/* same for pending user messages */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]