[gimp] app: don't propagate NULL error when saving XCFs



commit 8121769dc97daeca18497386d838ca6785a7e1b9
Author: Ell <ell_se yahoo com>
Date:   Mon Jul 10 10:34:41 2017 -0400

    app: don't propagate NULL error when saving XCFs
    
    xcf_save_foo() can fail without setting the error object, in which
    case trying to propagate it emits a CRITICAL.

 app/xcf/xcf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 135a92d..f336c33 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -389,7 +389,7 @@ xcf_save_stream (Gimp           *gimp,
       success = g_output_stream_close (info.output, NULL, &my_error);
     }
 
-  if (! success)
+  if (! success && my_error)
     g_propagate_prefixed_error (error, my_error,
                                 _("Error writing '%s': "), filename);
 


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