]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Allow pool_error to be called with no pool
authorMichael Schroeder <mls@suse.de>
Tue, 30 Jan 2018 12:57:00 +0000 (13:57 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 30 Jan 2018 12:57:00 +0000 (13:57 +0100)
In that case we just return with the specified value and
don't log anything.

src/pool.c

index 1d9eadc03cb15c83ddcba2283d83b1cde3888926..ba5e799c15e8e718dcbb65f4dbd2b6ccbf5b35c0 100644 (file)
@@ -1517,6 +1517,9 @@ pool_error(Pool *pool, int ret, const char *format, ...)
 {
   va_list args;
   int l;
+
+  if (!pool)
+    return ret;
   va_start(args, format);
   if (!pool->errstr)
     {