Allocate col_text and col_text_len when the fdata struct is allocated.
svn path=/trunk/; revision=29817
This commit is contained in:
parent
0c5dfd7698
commit
1e137770e6
|
@ -632,8 +632,6 @@ show_cell_data_func(GtkTreeViewColumn *col _U_, GtkCellRenderer *renderer,
|
||||||
fdata = record->fdata;
|
fdata = record->fdata;
|
||||||
|
|
||||||
if (!record->columnized || !record->colorized) {
|
if (!record->columnized || !record->colorized) {
|
||||||
g_assert((fdata->col_text == NULL && !record->columnized) ||
|
|
||||||
(fdata->col_text != NULL && record->columnized));
|
|
||||||
packet_list_dissect_and_cache_iter(packetlist, iter,
|
packet_list_dissect_and_cache_iter(packetlist, iter,
|
||||||
!record->columnized,
|
!record->columnized,
|
||||||
!record->colorized);
|
!record->colorized);
|
||||||
|
|
|
@ -673,17 +673,12 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i
|
||||||
|
|
||||||
g_assert(record->physical_pos == row);
|
g_assert(record->physical_pos == row);
|
||||||
|
|
||||||
|
g_assert((record->fdata->col_text != NULL)&&(record->fdata->col_text_len != NULL));
|
||||||
|
|
||||||
if (record->fdata->col_text && record->fdata->col_text[col] != NULL)
|
if (record->fdata->col_text && record->fdata->col_text[col] != NULL)
|
||||||
/* TODO: Column already contains a value. Bail out */
|
/* TODO: Column already contains a value. Bail out */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!record->fdata->col_text) {
|
|
||||||
record->fdata->col_text_len = se_alloc0(sizeof(record->fdata->col_text) *
|
|
||||||
(packet_list->n_columns-1));
|
|
||||||
record->fdata->col_text = se_alloc0(sizeof(record->fdata->col_text) *
|
|
||||||
(packet_list->n_columns-1));
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (cfile.cinfo.col_fmt[col]) {
|
switch (cfile.cinfo.col_fmt[col]) {
|
||||||
case COL_DEF_SRC:
|
case COL_DEF_SRC:
|
||||||
case COL_RES_SRC: /* COL_DEF_SRC is currently just like COL_RES_SRC */
|
case COL_RES_SRC: /* COL_DEF_SRC is currently just like COL_RES_SRC */
|
||||||
|
|
Loading…
Reference in New Issue