aboutsummaryrefslogtreecommitdiff
path: root/chardev/wctablet.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/wctablet.c')
-rw-r--r--chardev/wctablet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/chardev/wctablet.c b/chardev/wctablet.c
index e8b292c43c..43bdf6b608 100644
--- a/chardev/wctablet.c
+++ b/chardev/wctablet.c
@@ -319,7 +319,9 @@ static void wctablet_chr_finalize(Object *obj)
{
TabletChardev *tablet = WCTABLET_CHARDEV(obj);
- qemu_input_handler_unregister(tablet->hs);
+ if (tablet->hs) {
+ qemu_input_handler_unregister(tablet->hs);
+ }
}
static void wctablet_chr_open(Chardev *chr,