aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2006-12-01 02:55:45 +0000
committerStephen Fisher <steve@stephen-fisher.com>2006-12-01 02:55:45 +0000
commit212cbb2e8c463e07bec5d3d0ccb18ee406487fb4 (patch)
treead25ce5f741388f68221593b890dfb7dd5c7df5e /gtk
parent5ab5899d5ed90afbedbb832322e9c3534876aafe (diff)
downloadwireshark-212cbb2e8c463e07bec5d3d0ccb18ee406487fb4.tar.gz
wireshark-212cbb2e8c463e07bec5d3d0ccb18ee406487fb4.tar.bz2
wireshark-212cbb2e8c463e07bec5d3d0ccb18ee406487fb4.zip
Fix for bug #1117: Crash on next action [such as another stats window] when
flow graph window is open. Added if(pinfo->cinfo) before attempting to use pinfo->cinfo->col_first. The rest is indentation changes for the new if statement. svn path=/trunk/; revision=20028
Diffstat (limited to 'gtk')
-rw-r--r--gtk/flow_graph.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c
index fe6340c323..ef0d0202e4 100644
--- a/gtk/flow_graph.c
+++ b/gtk/flow_graph.c
@@ -256,25 +256,27 @@ static int flow_graph_frame_add_to_graph(packet_info *pinfo)
}
- if (pinfo->cinfo->col_first[COL_INFO]>=0){
-
- for (i = pinfo->cinfo->col_first[COL_INFO]; i <= pinfo->cinfo->col_last[COL_INFO]; i++) {
- if (pinfo->cinfo->fmt_matx[i][COL_INFO]) {
- colinfo = g_strdup(pinfo->cinfo->col_data[i]);
+ if(pinfo->cinfo) {
+ if (pinfo->cinfo->col_first[COL_INFO]>=0){
+
+ for (i = pinfo->cinfo->col_first[COL_INFO]; i <= pinfo->cinfo->col_last[COL_INFO]; i++) {
+ if (pinfo->cinfo->fmt_matx[i][COL_INFO]) {
+ colinfo = g_strdup(pinfo->cinfo->col_data[i]);
+ }
}
}
- }
-
- if (pinfo->cinfo->col_first[COL_PROTOCOL]>=0){
- for (i = pinfo->cinfo->col_first[COL_PROTOCOL]; i <= pinfo->cinfo->col_last[COL_PROTOCOL]; i++) {
- if (pinfo->cinfo->fmt_matx[i][COL_PROTOCOL]) {
- protocol = g_strdup(pinfo->cinfo->col_data[i]);
-
+ if (pinfo->cinfo->col_first[COL_PROTOCOL]>=0){
+
+ for (i = pinfo->cinfo->col_first[COL_PROTOCOL]; i <= pinfo->cinfo->col_last[COL_PROTOCOL]; i++) {
+ if (pinfo->cinfo->fmt_matx[i][COL_PROTOCOL]) {
+ protocol = g_strdup(pinfo->cinfo->col_data[i]);
+
+ }
}
}
}
-
+
if (colinfo != NULL) {
if (protocol != NULL) {
gai->frame_label = g_strdup_printf("%.19s", colinfo);