forked from osmocom/wireshark
Allow for NULL preference descriptions.
svn path=/trunk/; revision=35242
This commit is contained in:
parent
d1787cafa4
commit
fc4d25fcc4
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue