aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-04-02 15:20:54 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-04-02 15:20:54 +0000
commite12df043a778a575d426376a0f03648f4f8a3554 (patch)
treed418437d599e4547926d4957b14fd47eb5ff240b /ui/gtk
parenta24133d747d75dab3fbea849dbd56757bd994fc5 (diff)
If a comment is cleared, remove it from fdata->opt_comment.
svn path=/trunk/; revision=41895
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/new_packet_list.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/gtk/new_packet_list.c b/ui/gtk/new_packet_list.c
index 8a2bf50e92..a5155896f4 100644
--- a/ui/gtk/new_packet_list.c
+++ b/ui/gtk/new_packet_list.c
@@ -1742,6 +1742,12 @@ new_packet_list_update_packet_comment(gchar *new_packet_comment)
}
}
+ /* Check if we are clearing the comment */
+ if(strlen(new_packet_comment) == 0) {
+ g_free(new_packet_comment);
+ new_packet_comment = NULL;
+ }
+
/* The comment has changed, let's update it */
g_free(record->fdata->opt_comment);
record->fdata->opt_comment = new_packet_comment;