Check for 0-sized private data. (#443869)

2007-06-14  Cody Russell  <bratsche@gnome.org>

        * gobject/gtype.c (g_type_class_add_private): Check for 0-sized
        private data. (#443869)


svn path=/trunk/; revision=5561
This commit is contained in:
Cody Russell 2007-06-15 03:50:27 +00:00 committed by Cody Russell
parent 71a9fa9879
commit 19086497ab
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-06-14 Cody Russell <bratsche@gnome.org>
* gobject/gtype.c (g_type_class_add_private): Check for 0-sized
private data. (#443869)
2007-06-14 Matthias Clasen <mclasen@redhat.com>
* glib/gmain.c (g_timeout_add_seconds): Fix doc typos. (#447534,

View File

@ -3483,6 +3483,8 @@ g_type_class_add_private (gpointer g_class,
TypeNode *node = lookup_type_node_I (instance_type);
gsize offset;
g_return_if_fail (private_size > 0);
if (!node || !node->is_instantiatable || !node->data || node->data->class.class != g_class)
{
g_warning ("cannot add private field to invalid (non-instantiatable) type '%s'",