projects
/
gnome.seed
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5bc248
)
Allow null struct return values
author
Ryan Brown
<r@nodr.org>
Mon, 11 Jan 2010 03:46:09 +0000
(21:46 -0600)
committer
Tim Horton
<hortont424@gmail.com>
Mon, 11 Jan 2010 22:15:47 +0000
(17:15 -0500)
libseed/seed-structs.c
patch
|
blob
|
history
diff --git
a/libseed/seed-structs.c
b/libseed/seed-structs.c
index
f9ea40c
..
73d0e48
100644
(file)
--- a/
libseed/seed-structs.c
+++ b/
libseed/seed-structs.c
@@
-627,6
+627,12
@@
JSObjectRef
seed_make_struct (JSContextRef ctx, gpointer strukt, GIBaseInfo * info)
{
JSObjectRef object, proto;
+
+ if (strukt == NULL)
+ {
+ return JSValueMakeNull (ctx);
+ }
+
seed_struct_privates *priv = g_slice_alloc (sizeof (seed_struct_privates));
priv->info = info ? g_base_info_ref (info) : 0;