diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2013-06-27 20:09:18 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-07-02 15:52:47 -0400 |
| commit | d94a8722cb29d8b897672be66ff3c9ff79eab6fe (patch) | |
| tree | 4314f9c98913c36a12525062680440a336a88092 /src/wayland-shm.c | |
| parent | protocol: add no_keymap format to keymap formats (diff) | |
| download | wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar.gz wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar.bz2 wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar.lz wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar.xz wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.tar.zst wayland-d94a8722cb29d8b897672be66ff3c9ff79eab6fe.zip | |
server: Make wl_object and wl_resource opaque structs
With the work to add wl_resource accessors and port weston to use them,
we're ready to make wl_resource and wl_object opaque structs. We keep
wl_buffer in the header for EGL stacks to use, but don't expose it by
default. In time we'll remove it completely, but for now it provides a
transition paths for code that still uses wl_buffer.
Reviewed-by: Jason Ekstrand<jason@jlekstrand.net>
Diffstat (limited to 'src/wayland-shm.c')
| -rw-r--r-- | src/wayland-shm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland-shm.c b/src/wayland-shm.c index c2e1df0..8a10253 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -283,6 +283,9 @@ wl_shm_buffer_create(struct wl_client *client, WL_EXPORT struct wl_shm_buffer * wl_shm_buffer_get(struct wl_resource *resource) { + if (resource == NULL) + return NULL; + if (wl_resource_instance_of(resource, &wl_buffer_interface, &shm_buffer_interface)) return wl_resource_get_user_data(resource); |
