aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pidl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pidl')
-rw-r--r--tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index ca34af34e0..175671b9c8 100644
--- a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -664,7 +664,9 @@ sub Struct($$$$)
$self->indent;
$self->pidl_code($_) foreach (@$vars);
$self->pidl_code("proto_item *item = NULL;");
- $self->pidl_code("proto_tree *tree = NULL;");
+ if($res) {
+ $self->pidl_code("proto_tree *tree = NULL;");
+ }
$self->pidl_code("int old_offset;");
$self->pidl_code("");
@@ -678,7 +680,9 @@ sub Struct($$$$)
$self->pidl_code("if (parent_tree) {");
$self->indent;
$self->pidl_code("item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);");
- $self->pidl_code("tree = proto_item_add_subtree(item, ett_$ifname\_$name);");
+ if($res) {
+ $self->pidl_code("tree = proto_item_add_subtree(item, ett_$ifname\_$name);");
+ }
$self->deindent;
$self->pidl_code("}");