From 7b732a9f80f3ff44071520c9ff1101a012fc7b28 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Wed, 29 Sep 1999 22:11:51 +0000 Subject: Fixed assert error reported by Dewi Morgan . 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 --- dfilter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dfilter.c') 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 @@ -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: -- cgit v1.2.3