fix jpeg error-handling setup
authorKen Raeburn <raeburn@raeburn.org>
Mon, 19 Jun 2000 07:21:13 +0000 (07:21 +0000)
committerKen Raeburn <raeburn@raeburn.org>
Mon, 19 Jun 2000 07:21:13 +0000 (07:21 +0000)
src/ChangeLog
src/xfns.c

index b95056b..336af92 100644 (file)
@@ -1,5 +1,8 @@
 2000-06-19  Ken Raeburn  <raeburn@gnu.org>
 
+       * xfns.c (jpeg_load): Fetch error-handling data first, then fill
+       in the custom handler pointer.
+
        * keyboard.c (follow_key, read_key_sequence): Use XUINT on key
        value, or checks for CHAR_META can fail when Lisp_Object is a
        union type.
index 31a3b7d..8edbd66 100644 (file)
@@ -8211,8 +8211,8 @@ jpeg_load (f, img)
 
   /* Customize libjpeg's error handling to call my_error_exit when an
      error is detected.  This function will perform a longjmp.  */
-  mgr.pub.error_exit = my_error_exit;
   cinfo.err = jpeg_std_error (&mgr.pub);
+  mgr.pub.error_exit = my_error_exit;
   
   if ((rc = setjmp (mgr.setjmp_buffer)) != 0)
     {