diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-04-18 00:50:45 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-04-18 00:50:45 +0000 |
commit | ec005ccd0be273ef5514221013ac2806184f15e9 (patch) | |
tree | 3eb7e4724bcf1f504d9fadfaa1d43f2c6e0dbef6 | |
parent | 92e27e03c14844a3a7f559ea7e70c2ad8e5482d8 (diff) |
Catch attempts to register ett_ values after the array of "tree is
expanded" flags has been allocated.
svn path=/trunk/; revision=5197
-rw-r--r-- | epan/proto.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index eb42540a87..e0d8d76281 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1,7 +1,7 @@ /* proto.c * Routines for protocol tree * - * $Id: proto.c,v 1.60 2002/04/04 20:23:50 guy Exp $ + * $Id: proto.c,v 1.61 2002/04/18 00:50:45 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2083,6 +2083,16 @@ proto_register_subtree_array(gint **indices, int num_indices) gint **ptr = indices; /* + * Make sure we haven't already allocated the array of "tree is + * expanded" flags. + * + * XXX - if it's *really* important to allow more ett_ values to + * be given out after "proto_init()" is called, we could expand + * the array. + */ + g_assert(tree_is_expanded == NULL); + + /* * Assign "num_indices" subtree numbers starting at "num_tree_types", * returning the indices through the pointers in the array whose * first element is pointed to by "indices", and update |