[goffice] Don't crash on inconsistent format. [#705099]



commit 852e8cdbfd1919dab03f4c97a44c8a2ceec4b50e
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jul 30 12:03:57 2013 -0600

    Don't crash on inconsistent format. [#705099]
    
    2013-07-30 Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * goffice/utils/go-format.c (go_format_output_to_odf): watch for conditions
        without format

 ChangeLog                 |    5 +++++
 NEWS                      |    3 +++
 goffice/utils/go-format.c |    3 +++
 3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5656a6e..7fa4668 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-30 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * goffice/utils/go-format.c (go_format_output_to_odf): watch for conditions
+       without format
+
 2013-07-28  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/utils/go-pixbuf.c (go_pixbuf_save),
diff --git a/NEWS b/NEWS
index 28c2f6e..679ec37 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 goffice 0.10.5:
 
+Andreas:
+       * Don't crash on inconsistent format. [#705099]
+
 Jean:
        * Don't crash when loading an EMF image without valid data. [#704311]
        * Fixed text and path items positions. [see #704391]
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 3543904..8994627 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -8639,6 +8639,9 @@ go_format_output_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
                act_fmt = fmt;
        }
 
+       if (act_fmt == NULL)
+                       return FALSE;
+
        g_object_get (G_OBJECT (xout), "pretty-print", &pp, NULL);
        /* We need to switch off pretty printing since number:text preserves whitespace */
        g_object_set (G_OBJECT (xout), "pretty-print", FALSE, NULL);


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