[gnumeric] ssconvert: improve null check.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ssconvert: improve null check.
- Date: Tue, 3 Mar 2020 19:04:27 +0000 (UTC)
commit 66975f3ed56567eb8d84af4e20ead0f95caf009a
Author: Morten Welinder <terra gnome org>
Date: Tue Mar 3 14:03:38 2020 -0500
ssconvert: improve null check.
ChangeLog | 8 +++++++-
src/ssconvert.c | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 98068aa85..28e04185e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2020-03-03 Morten Welinder <terra gnome org>
+
+ * src/ssconvert.c (apply_updates): Move NULL check into here so
+ all callers are covered.
+
2020-02-24 Jean Brefort <jean brefort normalesup org>
- * src/ssconvert.c (convert): don't crash if ssconvert_set_cells is NULL.
+ * src/ssconvert.c (convert): don't crash if ssconvert_set_cells is
+ NULL.
2019-11-12 Morten Welinder <terra gnome org>
diff --git a/src/ssconvert.c b/src/ssconvert.c
index 96302d109..089b2ccb5 100644
--- a/src/ssconvert.c
+++ b/src/ssconvert.c
@@ -899,6 +899,9 @@ apply_updates (WorkbookView *wbv)
unsigned ui;
GnmParsePos pp;
+ if (!ssconvert_set_cells)
+ return 0;
+
pp.wb = wb;
pp.sheet = workbook_sheet_by_index (wb, 0);
pp.eval.col = 0;
@@ -1021,7 +1024,7 @@ convert (char const *inarg, char const *outarg, char const *mergeargs[],
wbv = workbook_view_new_from_uri (infile, fo,
io_context,
ssconvert_import_encoding);
- if ((ssconvert_set_cells != NULL) && apply_updates (wbv)) {
+ if (apply_updates (wbv)) {
res = 1;
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]