aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-30 12:57:48 +0100
committerGitHub <noreply@github.com>2018-06-30 12:57:48 +0100
commit167105e6069d2dd66cd2d472c2a6b67703838125 (patch)
treee6626f03fdd94c7832c4b5cb3b97e2a61cf6602e /render
parent63eb720871004219826f16e0a79a0014ac5516e4 (diff)
parent0c2a64df18f8740ab795fb2970d1954a8aac34b1 (diff)
Merge pull request #1101 from martinetd/static-analysis
Static analysis fixes
Diffstat (limited to 'render')
-rw-r--r--render/wlr_renderer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 98c91132..00f1e411 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -25,9 +25,12 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
}
void wlr_renderer_destroy(struct wlr_renderer *r) {
+ if (!r) {
+ return;
+ }
wlr_signal_emit_safe(&r->events.destroy, r);
- if (r && r->impl && r->impl->destroy) {
+ if (r->impl && r->impl->destroy) {
r->impl->destroy(r);
} else {
free(r);