[gnumeric] Stf: fix import crash from command line.



commit 931f7357a0b004a7ba739b6e3a462ac27e99eb18
Author: Morten Welinder <terra gnome org>
Date:   Tue Jan 15 22:32:41 2013 -0500

    Stf: fix import crash from command line.

 ChangeLog |   10 ++++++++--
 NEWS      |    1 +
 src/stf.c |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 395c9a2..d2331dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-15  Morten Welinder  <terra gnome org>
+
+	* src/stf.c (stf_read_workbook_auto_csvtab): Fix crash for text
+	import from command line.
+
 2013-01-15  Jean Brefort  <jean brefort normalesup org>
 
 	* configure.ac: renamed configure.in and update obsolete macros.
@@ -12,8 +17,9 @@
 2013-01-14  Jean Brefort  <jean brefort normalesup org>
 
 	* src/sheet-control-gui.c (sheet_control_gui_new): typo.
-	* src/sheet-object-graph.c (cb_graph_size_changed): do not remoe twice the
-	top and bottom margins when displaying a graph sheet. [#691472] 
+	* src/sheet-object-graph.c (cb_graph_size_changed): do not remoe
+	twice the top and bottom margins when displaying a graph
+	sheet. [#691472]
 
 2013-01-10  Morten Welinder  <terra gnome org>
 
diff --git a/NEWS b/NEWS
index a656888..cd97c7a 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ Morten:
 	* Improve handling of unknown functions.  [#109442]
 	* Add LINSOLVE function.
 	* Restrict size of MUNIT to avoid thrashing the system.  [#625544]
+	* Fix text import crash.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.0
diff --git a/src/stf.c b/src/stf.c
index 7ecf449..fca9643 100644
--- a/src/stf.c
+++ b/src/stf.c
@@ -501,7 +501,7 @@ stf_read_workbook_auto_csvtab (G_GNUC_UNUSED GOFileOpener const *fo, gchar const
 				     _("Some data did not fit on the "
 				       "sheet and was dropped."));
 		}
-		is_csv = po->sep.chr[0] == ',';
+		is_csv = po->sep.chr && po->sep.chr[0] == ',';
 		workbook_set_saveinfo
 			(book,
 			 GO_FILE_FL_WRITE_ONLY,



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