[gimp/gimp-2-10] plug-ins: fix previous cherry-picked commit.



commit a0a089004ae0587a4b2d8463551d4872342a36ca
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri Jul 23 16:46:28 2021 -0400

    plug-ins: fix previous cherry-picked commit.

 plug-ins/common/file-dicom.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c
index b3e9ec6334..9807d97bc3 100644
--- a/plug-ins/common/file-dicom.c
+++ b/plug-ins/common/file-dicom.c
@@ -447,8 +447,8 @@ load_image (const gchar  *filename,
           || strncmp (value_rep, "SQ", 2) == 0
           || strncmp (value_rep, "UN", 2) == 0)
         {
-          fread (&element_length, 1, 2, dicom); /* skip two bytes */
-          fread (&element_length, 1, 4, dicom);
+          fread (&element_length, 1, 2, DICOM); /* skip two bytes */
+          fread (&element_length, 1, 4, DICOM);
           if (big_endian && group_word != 0x0002)
             element_length = g_ntohl (element_length);
           else
@@ -459,7 +459,7 @@ load_image (const gchar  *filename,
         {
           guint16 el16;
 
-          fread (&el16, 1, 2, dicom);
+          fread (&el16, 1, 2, DICOM);
           if (big_endian && group_word != 0x0002)
             element_length = g_ntohs (el16);
           else
@@ -540,12 +540,12 @@ load_image (const gchar  *filename,
               else
                 {
                   g_debug ("Transfer syntax %s is not supported by GIMP.", (gchar *) value);
-                  g_set_error (error, GIMP_PLUG_IN_ERROR, 0,
+                  g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                               _("Transfer syntax %s is not supported by GIMP."),
                               (gchar *) value);
                   g_free (dicominfo);
-                  fclose (dicom);
-                  return NULL;
+                  fclose (DICOM);
+                  return -1;
                 }
               break;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]