[gnumeric] Names: fix criticals.



commit 0f0918b2082e93781dc25a1c8ff3a9a795332364
Author: Morten Welinder <terra gnome org>
Date:   Sun Mar 2 10:10:16 2014 -0500

    Names: fix criticals.

 ChangeLog          |    5 +++++
 NEWS               |    1 +
 src/xml-sax-read.c |    7 ++++++-
 3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index faf79ce..d303b63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-02  Morten Welinder  <terra gnome org>
+
+       * src/xml-sax-read.c (xml_sax_named_expr_end): Avoid criticals
+       when encountering strangeness.
+
 2014-02-28  Morten Welinder  <terra gnome org>
 
        * src/sheet-control-gui.c (resize_pane_pos, set_resize_pane_pos):
diff --git a/NEWS b/NEWS
index ef17630..cc8cb61 100644
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,7 @@ Morten:
        * Improve ssdiff for sheet attributes.
        * Fix split pane problem.  [#725375]
        * Don't generate value format during xls read.  [#725453]
+       * Fix name criticals.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.11
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index f677f5d..7f2b42f 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -2716,7 +2716,12 @@ xml_sax_named_expr_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
                        state->name.position = NULL;
                        state->delayed_names = g_list_prepend (state->delayed_names, nexpr);
                } else {
-                       g_warning ("Strangeness with defined name");
+                       g_warning ("Strangeness with defined name: %s",
+                                  state->name.name);
+                       g_free (state->name.value);
+                       state->name.value = NULL;
+                       g_free (state->name.position);
+                       state->name.position = NULL;
                }
        }
 


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