diff options
Diffstat (limited to 'src/context.c')
-rw-r--r-- | src/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context.c b/src/context.c index 53028a1..a846b8f 100644 --- a/src/context.c +++ b/src/context.c @@ -206,7 +206,7 @@ xkb_context_ref(struct xkb_context *ctx) XKB_EXPORT void xkb_context_unref(struct xkb_context *ctx) { - if (--ctx->refcnt > 0) + if (!ctx || --ctx->refcnt > 0) return; xkb_context_include_path_clear(ctx); |