X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fcompress.c;h=8396316dca06493a35560977c6259501dc0fbfa5;hb=b143910f8f18f0725adaf4af7e0bbe7ac5ab5382;hp=1b0d2c9f9aff5d0f04b1537bda5f264b3c9efd89;hpb=bb3005f9b9fff1333900d8635ad9aeda1021eb94;p=wimlib diff --git a/src/compress.c b/src/compress.c index 1b0d2c9f..8396316d 100644 --- a/src/compress.c +++ b/src/compress.c @@ -19,7 +19,7 @@ * details. * * You should have received a copy of the GNU Lesser General Public License - * along with this file; if not, see http://www.gnu.org/licenses/. + * along with this file; if not, see https://www.gnu.org/licenses/. */ #ifdef HAVE_CONFIG_H @@ -122,6 +122,11 @@ wimlib_create_compressor(enum wimlib_compression_type ctype, { bool destructive; struct wimlib_compressor *c; + int ret; + + ret = wimlib_global_init(0); + if (ret) + return ret; destructive = (compression_level & WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE); compression_level &= ~WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE; @@ -146,8 +151,6 @@ wimlib_create_compressor(enum wimlib_compression_type ctype, c->ctype = ctype; c->max_block_size = max_block_size; if (c->ops->create_compressor) { - int ret; - if (compression_level == 0) compression_level = default_compression_levels[ctype]; if (compression_level == 0)