mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-08 18:40:16 +01:00
If we never initialized the libwacom database, don't check the refcount
If the libwacom context failed to initialize for some reason, the database is NULL and the refcount remains at zero. Calling unref should just work then. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b12084ef76
commit
82102f8599
1 changed files with 3 additions and 0 deletions
|
|
@ -4257,6 +4257,9 @@ libinput_libwacom_ref(struct libinput *li)
|
|||
void
|
||||
libinput_libwacom_unref(struct libinput *li)
|
||||
{
|
||||
if (!li->libwacom.db)
|
||||
return;
|
||||
|
||||
assert(li->libwacom.refcount >= 1);
|
||||
|
||||
if (--li->libwacom.refcount == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue