summaryrefslogtreecommitdiff
path: root/gtree.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-09-18 02:12:32 +0000
committerTim Janik <timj@src.gnome.org>1998-09-18 02:12:32 +0000
commitac3a8ac9a7cd2d5f085d8c6964fd14ebe7e70d47 (patch)
treecf96dc645b7ac72549eab3882f8a4ef2a5abf788 /gtree.c
parentebc96dde356e64305c6411febfc3c85ff03f3e47 (diff)
check for key_compare_func != NULL (reported by Michal Kara).
Fri Sep 18 03:41:20 1998 Tim Janik <timj@gtk.org> * gtree.c (g_tree_new): check for key_compare_func != NULL (reported by Michal Kara).
Diffstat (limited to 'gtree.c')
-rw-r--r--gtree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtree.c b/gtree.c
index 00bfb14c0..0d7f78cf9 100644
--- a/gtree.c
+++ b/gtree.c
@@ -87,6 +87,8 @@ g_tree_new (GCompareFunc key_compare_func)
{
GRealTree *rtree;
+ g_return_val_if_fail (key_compare_func != NULL, NULL);
+
rtree = g_new (GRealTree, 1);
rtree->root = NULL;
rtree->key_compare = key_compare_func;