aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/prefs_dlg.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-25 22:50:58 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-25 22:50:58 +0000
commit37fb68368707e097e88b0ba3190e37fa2ba010bd (patch)
tree05764a1b99c0b6b3f5e55a2a69dbe1c7343248f6 /gtk/prefs_dlg.c
parenta40a28c81bc3605eb1f504a4d87a91427545ea7f (diff)
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
Diffstat (limited to 'gtk/prefs_dlg.c')
-rw-r--r--gtk/prefs_dlg.c10
1 files changed, 7 insertions, 3 deletions
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();
}