aboutsummaryrefslogtreecommitdiffstats
path: root/dfilter.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-09-29 22:11:51 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-09-29 22:11:51 +0000
commit7b732a9f80f3ff44071520c9ff1101a012fc7b28 (patch)
tree781dfc9f0b87ca0e6d2bafdf63f643f49b87cde7 /dfilter.c
parent901754eb9b6dd43fd8f0aff5ceca65ef8dad2aeb (diff)
Fixed assert error reported by Dewi Morgan <dewim@sco.com>.
After some bad dfilter parses, the top-level dfilter tree (global_df->dftree) would erroneously be set to the last good dfilter_node that was parsed. Later, the non-NULLness of the dftree made us clear it.. really confusing GTK internals. After _that_, new GNodes created via g_node_new() would all have the same address! svn path=/trunk/; revision=735
Diffstat (limited to 'dfilter.c')
-rw-r--r--dfilter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dfilter.c b/dfilter.c
index 2c115f0b53..d65143a165 100644
--- a/dfilter.c
+++ b/dfilter.c
@@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
- * $Id: dfilter.c,v 1.20 1999/09/29 14:41:33 gram Exp $
+ * $Id: dfilter.c,v 1.21 1999/09/29 22:11:51 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -353,6 +353,7 @@ dfilter_apply_node(GNode *gnode, proto_tree *ptree, const guint8* pd)
g_assert_not_reached();
case logical:
+ g_assert(gnode_a);
return check_logical(dnode->value.logical, gnode_a, gnode_b, ptree, pd);
case relation:
@@ -394,10 +395,13 @@ check_logical(gint operand, GNode *a, GNode *b, proto_tree *ptree, const guint8
switch(operand) {
case TOK_AND:
+ g_assert(b);
return (val_a && dfilter_apply_node(b, ptree, pd));
case TOK_OR:
+ g_assert(b);
return (val_a || dfilter_apply_node(b, ptree, pd));
case TOK_XOR:
+ g_assert(b);
val_b = dfilter_apply_node(b, ptree, pd);
return ( ( val_a || val_b ) && ! ( val_a && val_b ) );
case TOK_NOT: