[gnumeric] make cppcheck happy



commit 0a3a0a98c3272c74677dabc7ffa220faeae0013a
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Dec 17 18:41:02 2010 -0700

    make cppcheck happy
    
    2010-12-17  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/stf-export.c (gnm_stf_export): make cppcheck happy

 ChangeLog        |    4 ++++
 src/stf-export.c |    7 ++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c47feea..cb395fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-12-17  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/stf-export.c (gnm_stf_export): make cppcheck happy
+
+2010-12-17  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/wbc-gtk.c
 	* src/commands.h (cmd_analysis_tool): add argument
 	* src/commands.c (cmd_analysis_tool): use always_take_ownership
diff --git a/src/stf-export.c b/src/stf-export.c
index d052873..f5f26c1 100644
--- a/src/stf-export.c
+++ b/src/stf-export.c
@@ -372,10 +372,11 @@ gnm_stf_export (GnmStfExport *stfe)
 		}
 	}
 
-	if (stfe->locale) {
+	if (old_locale)  /* go_setlocale clears the cache, */
+		         /*so we don't want to call it with NULL*/
 		go_setlocale (LC_ALL, old_locale);
-		g_free (old_locale);
-	}
+	g_free (old_locale);
+	
 
 	g_object_set (G_OBJECT (stfe), "sink", sink, NULL);
 	g_object_unref (sink);



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