diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-14 10:33:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 10:33:46 -0400 |
commit | 53052b3f6e457f35d46fc3a71bd7eac96e55a484 (patch) | |
tree | c51bfcd472cf38df7528eab9330bb0e44981ffbb /render/wlr_texture.c | |
parent | 1e1e9887fba15291256a806aca6cc6f94a8f671e (diff) | |
parent | e922e62924314866620cce662756ff09c8092cc2 (diff) |
Merge pull request #85 from martinetd/refactor_states
Refactor states
Diffstat (limited to 'render/wlr_texture.c')
-rw-r--r-- | render/wlr_texture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c index 72d56c8f..f98284a1 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -9,8 +9,10 @@ void wlr_texture_init(struct wlr_texture *texture, } void wlr_texture_destroy(struct wlr_texture *texture) { - if (texture && texture->impl->destroy) { + if (texture && texture->impl && texture->impl->destroy) { texture->impl->destroy(texture); + } else { + free(texture); } } |