From: Eli Zaretskii Date: Tue, 13 Aug 2013 16:20:39 +0000 (+0300) Subject: Fail zlib-decompress-region if loading zlib on Windows failed. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~274 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=866c710eeb75ce47767442952028d79b76c1606a;p=emacs.git Fail zlib-decompress-region if loading zlib on Windows failed. src/decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil if loading zlib failed. --- diff --git a/src/ChangeLog b/src/ChangeLog index 70a1fa28db5..1cb8002ccf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-08-13 Eli Zaretskii + + * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil + if loading zlib failed. + 2013-08-13 Jan Djärv * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by diff --git a/src/decompress.c b/src/decompress.c index b7cd8a6c404..452a9210402 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -146,6 +146,8 @@ This function can be called only in unibyte buffers. */) #ifdef WINDOWSNT if (!zlib_initialized) zlib_initialized = init_zlib_functions (); + if (!zlib_initialized) + return Qnil; #endif /* This is a unibyte buffer, so character positions and bytes are