g_tree_traverse on an empty GTree
- From: Simon K}gedal <sika8225 csd uu se>
 
- To: gtk-list redhat com
 
- Subject: g_tree_traverse on an empty GTree
 
- Date: Sun, 15 Nov 1998 21:17:43 +0100
 
Hi,                                                                       
I want to be able to run g_tree_traverse on a GTree that is empty
(but of course created, with g_tree_new). But line 167 in gtree.c
complains on this. It says:                                      
g_return_if_fail (rtree->root != NULL);
I'd rather have it just:
if (!rtree->root)
  return;        
Or is there something illogical with being able to do that? Otherwise,
I'll have to check myself if the tree is empty, and how do I do that  
without using g_tree_nnodes (tree) ?                                
Thanks,
-- 
Simon Kågedal <simon@sdf.se> - Homepage: http://www.sdf.se/~simon/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]