diff options
author | Kristian Høgsberg <krh@redhat.com> | 2009-02-22 20:57:57 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2009-02-22 20:57:57 -0500 |
commit | 4a35fc2563264601967de14990f1c0b3264acfe3 (patch) | |
tree | f6106bb76f9861933400f9f13f5a45e5278ed20b | |
parent | 0555d8e6fc95f87a3c6b3d2e6aec65d93af5f270 (diff) | |
download | wayland-4a35fc2563264601967de14990f1c0b3264acfe3.tar.gz wayland-4a35fc2563264601967de14990f1c0b3264acfe3.tar.xz wayland-4a35fc2563264601967de14990f1c0b3264acfe3.zip |
Handle marshalling NULL objects.
-rw-r--r-- | connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connection.c b/connection.c index be9c88b..112ee4f 100644 --- 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++; |