diff options
Diffstat (limited to 'render/wlr_texture.c')
-rw-r--r-- | render/wlr_texture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c index 8be2e811..e327bb5c 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -6,9 +6,12 @@ #include <wlr/render/wlr_texture.h> #include "types/wlr_buffer.h" -void wlr_texture_init(struct wlr_texture *texture, +void wlr_texture_init(struct wlr_texture *texture, struct wlr_renderer *renderer, const struct wlr_texture_impl *impl, uint32_t width, uint32_t height) { + assert(renderer); + memset(texture, 0, sizeof(*texture)); + texture->renderer = renderer; texture->impl = impl; texture->width = width; texture->height = height; |