projects
/
gnome.seed
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5c4352
)
Improve handling of case where constructing struct with 0 size
author
Robert Carr
<racarr@gnome.org>
Thu, 17 Dec 2009 22:32:36 +0000
(17:32 -0500)
committer
Robert Carr
<racarr@gnome.org>
Thu, 17 Dec 2009 22:32:36 +0000
(17:32 -0500)
libseed/seed-structs.c
patch
|
blob
|
history
diff --git
a/libseed/seed-structs.c
b/libseed/seed-structs.c
index
42b5d52
..
1c58e0a
100644
(file)
--- a/
libseed/seed-structs.c
+++ b/
libseed/seed-structs.c
@@
-690,7
+690,12
@@
seed_construct_struct_type_with_parameters (JSContextRef ctx,
{
size = g_union_info_get_size ((GIUnionInfo *) info);
}
- g_assert (size);
+ if (!size)
+ {
+ g_critical ("Struct/union of type: %s has size 0 in introspection data. Please check GIR",
+ g_base_info_get_name (info));
+ g_assert(size);
+ }
object = g_slice_alloc0 (size);
SEED_NOTE (CONSTRUCTION,