GTK: fix a crash when switching a column to custom through 'Edit Column Details'

Bug: 11245
Change-Id: I269d4dc8bd1ec23e3e6be4c9432563b8e275c548
Reviewed-on: https://code.wireshark.org/review/8778
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2015-06-05 21:08:31 +02:00
parent c2b713c093
commit 244f2fbbf6
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,8 @@ col_title_change_ok (GtkWidget *w, gpointer parent_w)
}
if (cur_fmt == COL_CUSTOM) {
if (strcmp (name, get_column_custom_field(col_id)) != 0) {
const gchar *custom_field = get_column_custom_field(col_id);
if ((custom_field && strcmp (name, custom_field) != 0) || (custom_field == NULL)) {
set_column_custom_field (col_id, name);
recreate = TRUE;
}