From bde3b4c465fb12abc6aaee7a462acc797afb0f77 Mon Sep 17 00:00:00 2001 From: Morten Welinder Date: Wed, 10 Apr 2002 14:44:57 +0000 Subject: [PATCH] Attempt to fix leak printing crash. --- src/parse-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parse-util.c b/src/parse-util.c index 184b597d5..b8af45796 100644 --- a/src/parse-util.c +++ b/src/parse-util.c @@ -86,7 +86,8 @@ cellref_name (CellRef const *cell_ref, ParsePos const *pp, gboolean no_sheetname /* If it is a non-local reference, add the path to the external sheet */ if (sheet != NULL && !no_sheetname) { - if (sheet->workbook == pp->wb) + /* pp->wb==NULL happens for the leak printer. */ + if (pp->wb == NULL || sheet->workbook == pp->wb) return g_strconcat (sheet->name_quoted, "!", buffer, NULL); return g_strconcat ("[", sheet->workbook->filename, "]", sheet->name_quoted, "!", buffer, NULL); -- GitLab