mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
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:
parent
71a9fa9879
commit
19086497ab
@ -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>
|
2007-06-14 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmain.c (g_timeout_add_seconds): Fix doc typos. (#447534,
|
* glib/gmain.c (g_timeout_add_seconds): Fix doc typos. (#447534,
|
||||||
|
@ -3483,6 +3483,8 @@ g_type_class_add_private (gpointer g_class,
|
|||||||
TypeNode *node = lookup_type_node_I (instance_type);
|
TypeNode *node = lookup_type_node_I (instance_type);
|
||||||
gsize offset;
|
gsize offset;
|
||||||
|
|
||||||
|
g_return_if_fail (private_size > 0);
|
||||||
|
|
||||||
if (!node || !node->is_instantiatable || !node->data || node->data->class.class != g_class)
|
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'",
|
g_warning ("cannot add private field to invalid (non-instantiatable) type '%s'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user