Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/opengl.c:
return NULL;
}
+static inline void wayland_gl_drawable_array_add(struct wl_array *drawables,
struct wayland_gl_drawable *gl)
+{
- struct wayland_gl_drawable **elem;
- if ((elem = wl_array_add(drawables, sizeof(gl)))) *elem = gl;
Instead of an allocating array that could fail, you could just add another linked list entry, say `release_entry` or `tmp_entry`, to the struct wayland_gl_drawable and use it to link them in a release list.
You can then also do the same to link drawables in a local release list in wgl_context_make_current.