[evolution-patches] Re: pls patch for review crash bug 49912



On Wed, 2003-10-22 at 02:17, leon.zhang wrote:
> ===================================================================
> RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard.c,v
> retrieving revision 1.108
> diff -u -r1.108 e-minicard.c
> --- evolution/addressbook/gui/widgets/e-minicard.c	21 Oct 2003 18:48:56 -0000	1.108
> +++ evolution/addressbook/gui/widgets/e-minicard.c	22 Oct 2003 09:03:20 -0000
> @@ -76,8 +76,10 @@
>  static void
>  e_minicard_field_destroy(EMinicardField *field)
>  {
> +	EText *text = E_TEXT(e_minicard_label->field);
>  	gtk_object_destroy(GTK_OBJECT(field->label));
>  	g_free(field);
> +	text->tep = NULL;
>  }

this code won't even compile..

I'm guessing you meant to use either:

EText *text = E_TEXT (field);

or

EText *text = E_TEXT (field->label);

neither of which will do what you want.  Neither EMinicardField nor
EMinicardLabel are subclasses of EText.

It's a bug that a canvas item that's been destroyed still has focus. 
Fixing it in the location and way you're describing is wrong.  It breaks
abstraction, causes a leak of of the event processor, and as I said
before won't even compile.

Chris



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