state, context: allow passing NULL to *_unref()
authorRan Benita <ran234@gmail.com>
Sun, 28 Oct 2012 23:00:27 +0000 (01:00 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 28 Oct 2012 23:20:04 +0000 (01:20 +0200)
commit7261f404d201b157dc0ce1ae0386fd74f3a128a7
treefbd0cf78ce7ace10dc1f79042163be0ab0b3528a
parenta51ee70419cf492a46020123294c7f708c81070d
state, context: allow passing NULL to *_unref()

For error handling code, it's nice to be able to pass NULL to these
function without worrying about segfaults ensuing. free() sets the
precedent here.

Also document this fact.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/context.c
src/state.c
test/state.c
xkbcommon/xkbcommon.h