projects
/
platform
/
upstream
/
libxkbcommon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
state, context: allow passing NULL to *_unref()
[platform/upstream/libxkbcommon.git]
/
src
/
state.c
diff --git
a/src/state.c
b/src/state.c
index
eaa1f10
..
48b2132
100644
(file)
--- a/
src/state.c
+++ b/
src/state.c
@@
-583,7
+583,7
@@
xkb_state_ref(struct xkb_state *state)
XKB_EXPORT void
xkb_state_unref(struct xkb_state *state)
{
- if (--state->refcnt > 0)
+ if (
!state ||
--state->refcnt > 0)
return;
xkb_keymap_unref(state->keymap);