neuwld

patched neuwld library (tracked)
git clone https://git.daat.foo/neuwld.git
Log | Files | Refs | README | LICENSE

commit 9e786425e1f5273fc53ff30f8abce0a6fcf4df8e
parent e3e448fdd7429644ec5893350bccf7baab2e1ff6
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 18 Jul 2013 19:50:38 -0700

Add missing error check

Diffstat:
Mwayland-shm.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/wayland-shm.c b/wayland-shm.c @@ -85,12 +85,19 @@ struct wld_shm_context * wld_shm_create_context(struct wl_display * display, shm = malloc(sizeof *shm); if (!shm) - return 0; + goto error0; shm->wl = NULL; wl_array_init(&shm->formats); shm->registry = wl_display_get_registry(display); + + if (!shm->registry) + { + DEBUG("Couldn't get registry\n"); + goto error1; + } + wl_registry_add_listener(shm->registry, &registry_listener, shm); wl_proxy_set_queue((struct wl_proxy *) shm->registry, queue);