aboutsummaryrefslogtreecommitdiff
path: root/backend/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-14 10:33:46 -0400
committerGitHub <noreply@github.com>2017-08-14 10:33:46 -0400
commit53052b3f6e457f35d46fc3a71bd7eac96e55a484 (patch)
treec51bfcd472cf38df7528eab9330bb0e44981ffbb /backend/backend.c
parent1e1e9887fba15291256a806aca6cc6f94a8f671e (diff)
parente922e62924314866620cce662756ff09c8092cc2 (diff)
Merge pull request #85 from martinetd/refactor_states
Refactor states
Diffstat (limited to 'backend/backend.c')
-rw-r--r--backend/backend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/backend.c b/backend/backend.c
index fc8ccdb0..790a14b3 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -32,8 +32,10 @@ bool wlr_backend_start(struct wlr_backend *backend) {
}
void wlr_backend_destroy(struct wlr_backend *backend) {
- if (backend->impl->destroy) {
+ if (backend->impl && backend->impl->destroy) {
backend->impl->destroy(backend);
+ } else {
+ free(backend);
}
}