diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-25 22:50:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-25 22:50:58 +0000 |
commit | 3bee1b06112811785f5c41c09014cef62b132c08 (patch) | |
tree | 05764a1b99c0b6b3f5e55a2a69dbe1c7343248f6 | |
parent | 85d6e3905d0d7232979fc1cf49ded629f1e2049f (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).
svn path=/trunk/; revision=12102
-rw-r--r-- | gtk/prefs_dlg.c | 10 |
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(); } |