aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/README.developer2
-rw-r--r--epan/prefs.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 49392c98c6..8f6c99d788 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -3563,7 +3563,7 @@ Where: module - Returned by the prefs_register_protocol routine
the preference file will already have it
title - Field title in the preferences dialog
description - Comments added to the preference file above the
- preference value
+ preference value and shown as tooltip in the GUI, or NULL
var - pointer to the storage location that is updated when the
field is changed in the preference dialog box. Note that
with string preferences the given pointer is overwritten
diff --git a/epan/prefs.c b/epan/prefs.c
index 8179457449..a73fa3a3c0 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -2763,7 +2763,8 @@ write_pref(gpointer data, gpointer user_data)
* Make multiple line descriptions appear as
* multiple commented lines in prefs file.
*/
- if (g_ascii_strncasecmp(pref->description,"", 2) != 0) {
+ if (pref->description &&
+ (g_ascii_strncasecmp(pref->description,"", 2) != 0)) {
desc_lines = g_strsplit(pref->description,"\n",0);
for (i = 0; desc_lines[i] != NULL; ++i) {
fprintf(arg->pf, "\n# %s", desc_lines[i]);