diff --git a/src/wayland-server.c b/src/wayland-server.c index ee53f764..f7e0e6b2 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1285,6 +1285,11 @@ wl_global_create(struct wl_display *display, return NULL; } + if (display->id >= UINT32_MAX) { + wl_log("wl_global_create: ran out of global names\n"); + return NULL; + } + global = zalloc(sizeof *global); if (global == NULL) return NULL;