projects
/
platform
/
upstream
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0555d8e
)
Handle marshalling NULL objects.
author
Kristian Høgsberg
<krh@redhat.com>
Mon, 23 Feb 2009 01:57:57 +0000
(20:57 -0500)
committer
Kristian Høgsberg
<krh@redhat.com>
Mon, 23 Feb 2009 01:57:57 +0000
(20:57 -0500)
connection.c
patch
|
blob
|
history
diff --git
a/connection.c
b/connection.c
index
be9c88b
..
112ee4f
100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-252,7
+252,7
@@
wl_connection_vmarshal(struct wl_connection *connection,
case 'o':
case 'n':
object = va_arg(ap, struct wl_object *);
- *p++ = object
->id
;
+ *p++ = object
? object->id : 0
;
break;
default:
assert(0);
@@
-331,7
+331,7
@@
wl_connection_demarshal(struct wl_connection *connection,
case 'o':
types[i] = &ffi_type_pointer;
object = wl_hash_lookup(objects, *p);
- if (object == NULL)
+ if (object == NULL
&& *p != 0
)
printf("unknown object (%d)\n", *p);
values[i].object = object;
p++;