aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-09-06 09:18:09 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-09-06 09:18:09 +0000
commit027bfdf5f3539bde199639fa4fc965b4c10495d5 (patch)
treea3d7120fa88a9094dacce32b4ad61728ded02222 /epan/dissectors/packet-tcp.c
parentad6be9beb88be92298a45ced619db6659ff66dcf (diff)
Check for valid tcpd, as it may be NULL.
svn path=/trunk/; revision=38894
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 8bf2cab7b1..acf4e52775 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -3830,9 +3830,10 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tcpd->ta->flags|=TCP_A_REUSED_PORTS;
}
- item = proto_tree_add_uint(tcp_tree, hf_tcp_stream, tvb, offset, 0, tcpd->stream);
- PROTO_ITEM_SET_GENERATED(item);
-
+ if (tcpd) {
+ item = proto_tree_add_uint(tcp_tree, hf_tcp_stream, tvb, offset, 0, tcpd->stream);
+ PROTO_ITEM_SET_GENERATED(item);
+ }
/* Do we need to calculate timestamps relative to the tcp-stream? */
if (tcp_calculate_ts) {