Ethereal-dev: Re: [Ethereal-dev] Patch to avoid crash while closing Ethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 7 Oct 2003 01:23:46 -0700
On Thu, Sep 25, 2003 at 01:32:44AM +0200, RABRET Laurent FTRD/DAC/ISS wrote:
> A system exit caused Ethereal to use a dangling pointer leading to an
> app crash. I.E. a system exit caused do_quit() to return FALSE. Hence,
> the top_level->window was deleted but not necessarily set to NULL. With
> this patch, do_quit always returns TRUE and it's therefore safe to take
> geometry's info after gtk_main (the system destroys Windows). In
> addition, I'm not sure it is recommended to test the window pointer of
> the widget. I prefer to use the GTK_WIDGET_NO_WINDOW() macro.

I've checked in a change that handles that differently - instead of
fetching the window geometry when exiting, we do so when the geometry is
changed.