Ethereal-dev: [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: "RABRET Laurent FTRD/DAC/ISS" <laurent.rabret@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Sep 2003 01:32:44 +0200
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.
Thanks to check in.
Laurent

Attachment: main.c.patch
Description: main.c.patch