From 37fb68368707e097e88b0ba3190e37fa2ba010bd Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 25 Sep 2004 22:50:58 +0000 Subject: When applying preferences, we have to apply the protocol preferences before applying any other preferences, as, before we've applied them, the internal state of the preferences in some dissectors might be inconsistent (for example, the 802.11 dissector might've had its number-of-WEP-keys preference increased but might not yet have allocated a table for the WEP keys), and, as "gui_prefs_apply()" could cause a redissection when redisplaying, that could cause dissectors to malfunction (e.g., crash). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12102 f5534014-38df-0310-8fa8-9805f1628bb7 --- gtk/prefs_dlg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gtk/prefs_dlg.c') diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c index ce6710eb2f..9c5b4db37f 100644 --- a/gtk/prefs_dlg.c +++ b/gtk/prefs_dlg.c @@ -1005,7 +1005,13 @@ prefs_main_fetch_all(GtkWidget *dlg, gboolean *must_redissect) static void prefs_main_apply_all(GtkWidget *dlg) { - /* Now apply those preferences. */ + /* + * Apply the protocol preferences first - "gui_prefs_apply()" could + * cause redissection, and we have to make sure the protocol + * preference changes have been fully applied. + */ + prefs_apply_all(); + gui_prefs_apply(OBJECT_GET_DATA(dlg, E_GUI_PAGE_KEY)); layout_prefs_apply(OBJECT_GET_DATA(dlg, E_GUI_LAYOUT_PAGE_KEY)); column_prefs_apply(OBJECT_GET_DATA(dlg, E_GUI_COLUMN_PAGE_KEY)); @@ -1023,8 +1029,6 @@ prefs_main_apply_all(GtkWidget *dlg) #endif /* HAVE_LIBPCAP */ printer_prefs_apply(OBJECT_GET_DATA(dlg, E_PRINT_PAGE_KEY)); nameres_prefs_apply(OBJECT_GET_DATA(dlg, E_NAMERES_PAGE_KEY)); - - prefs_apply_all(); } -- cgit v1.2.3