aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2017-08-15 12:16:23 +0200
committernyorain <nyorain@gmail.com>2017-08-15 12:16:23 +0200
commit7d0bf9a1a77420f09389bda1acafcd4bd42e82f1 (patch)
tree9758b3fb2d1628480655efa30510db12d0b9b6da
parentaa20634309669c967c53a1aae8aaab7ee0553a8a (diff)
Simplify tablet pad destruction
-rw-r--r--types/wlr_tablet_pad.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/types/wlr_tablet_pad.c b/types/wlr_tablet_pad.c
index dbe35e16..07f9da10 100644
--- a/types/wlr_tablet_pad.c
+++ b/types/wlr_tablet_pad.c
@@ -13,11 +13,7 @@ void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
}
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
- if (!pad) {
- return;
- }
-
- if (pad->impl && pad->impl->destroy) {
+ if (pad && pad->impl && pad->impl->destroy) {
pad->impl->destroy(pad);
} else {
free(pad);