aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/prefs_dlg.c
diff options
context:
space:
mode:
authorsfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-16 21:45:02 +0000
committersfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-16 21:45:02 +0000
commit6f1088527a6eabf49768b3dfa0fd54c16bbc07c4 (patch)
tree36c5178f0bb3cb15c9dd65288ad87084d48549d1 /gtk/prefs_dlg.c
parente63c4583d5091b649bab95531ceb791cef979cd8 (diff)
Fix bug #1548: call of "Protocol Preferences" results in GTK error msg
at the command line git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21808 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/prefs_dlg.c')
-rw-r--r--gtk/prefs_dlg.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index 55e2a1e60a..26ba4d4747 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -1833,16 +1833,18 @@ properties_cb(GtkWidget *w, gpointer dummy)
page_num++) {
/* Get the frame from the scrollable window */
frame = OBJECT_GET_DATA(sw, E_PAGESW_FRAME_KEY);
- /* Get the module for this page. */
- page_module = OBJECT_GET_DATA(frame, E_PAGE_MODULE_KEY);
- if (page_module == NULL)
- continue; /* It doesn't have one. */
- if (page_module == p.module) {
+ /* Get the module for this page (non-protocol prefs don't have one). */
+ if(frame) {
+ page_module = OBJECT_GET_DATA(frame, E_PAGE_MODULE_KEY);
+ if (page_module != NULL) {
+ if (page_module == p.module) {
tree_select_node(
OBJECT_GET_DATA(prefs_w, E_PREFSW_TREE_KEY),
OBJECT_GET_DATA(frame, E_PAGE_ITER_KEY));
return;
}
+ }
+ }
}
}