diff --git a/libpkgconf/client.c b/libpkgconf/client.c index f5f4717..811e043 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -324,6 +324,9 @@ pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t linen size_t len; va_list va; + if (client == NULL) + return false; + len = snprintf(errbuf, sizeof errbuf, "%s:" SIZE_FMT_SPECIFIER " [%s]: ", filename, lineno, funcname); va_start(va, format);