On Tue, Mar 29, 2022 at 1:15 AM Maxim Davydov <maxim.davy...@openvz.org> wrote: > > Attempt to finalize msmouse after initalization brings to segmentation > fault in QTAILQ_REMOVE. > > Signed-off-by: Maxim Davydov <maxim.davy...@openvz.org>
Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > chardev/wctablet.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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, > -- > 2.31.1 >