projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b12084e
)
If we never initialized the libwacom database, don't check the refcount
author
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 26 Jun 2019 04:15:09 +0000
(14:15 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 26 Jun 2019 04:15:09 +0000
(14:15 +1000)
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>
src/libinput.c
patch
|
blob
|
history
diff --git
a/src/libinput.c
b/src/libinput.c
index
c0cd2fa
..
6d00a00
100644
(file)
--- a/
src/libinput.c
+++ b/
src/libinput.c
@@
-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) {