[gimp/metadata-browser] file-pdf-save: Fix bogus C code



commit aaa0d87551d22ac0ab647441cd7f6395ed50e6e3
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Dec 1 01:09:51 2011 +0530

    file-pdf-save: Fix bogus C code

 plug-ins/common/file-pdf-save.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/common/file-pdf-save.c b/plug-ins/common/file-pdf-save.c
index 7cc138e..343b123 100644
--- a/plug-ins/common/file-pdf-save.c
+++ b/plug-ins/common/file-pdf-save.c
@@ -340,10 +340,6 @@ run (const gchar      *name,
 
   gint32                  temp;
 
-#if PDF_DEBUG
-  const gchar            *cairo_status;
-#endif
-
   gint                   *layers;
   gint32                  num_of_layers;
   GimpDrawable           *layer;
@@ -399,13 +395,18 @@ run (const gchar      *name,
   if (cairo_surface_status (pdf_file) != CAIRO_STATUS_SUCCESS)
     {
 #if PDF_DEBUG
-      cairo_status =  cairo_status_to_string (cairo_surface_status (pdf_file));
-#endif
+      char *str = g_strdup_printf
+        ("An error occured while creating the PDF file!\n"
+         "%s\n"
+         "Make sure you entered a valid filename and that the selected location isn't read only!",
+         cairo_status_to_string (cairo_surface_status (pdf_file)));
+
+      gimp_message (str);
+      g_free (str);
+#else
       gimp_message ("An error occured while creating the PDF file!\n"
-#if PDF_DEBUG
-                    cairo_status "\n"
-#endif
                     "Make sure you entered a valid filename and that the selected location isn't read only!");
+#endif
       values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
       return;
     }



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