[goffice] xml: avoid a double unref on exit.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] xml: avoid a double unref on exit.
- Date: Sat, 16 May 2015 14:26:17 +0000 (UTC)
commit d200a796872bc73eb3ce162a2b610e3662731875
Author: Morten Welinder <terra gnome org>
Date: Sat May 16 10:26:10 2015 -0400
xml: avoid a double unref on exit.
ChangeLog | 5 +++++
goffice/graph/gog-theme.c | 8 ++------
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 38fa1da..a04c67f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-16 Morten Welinder <terra gnome org>
+
+ * goffice/graph/gog-theme.c (theme_load_from_uri): Avoid double
+ unref on exit.
+
2015-05-14 Morten Welinder <terra gnome org>
* goffice/utils/go-pixbuf.c (go_pixbuf_finalize): Plug leak.
diff --git a/goffice/graph/gog-theme.c b/goffice/graph/gog-theme.c
index d9d7d4d..27ef10e 100644
--- a/goffice/graph/gog-theme.c
+++ b/goffice/graph/gog-theme.c
@@ -803,10 +803,8 @@ gog_theme_prep_sax (GOPersist *gp, GsfXMLIn *xin, xmlChar const **attrs)
state->name_lang_score = G_MAXINT;
state->desc_lang_score = G_MAXINT;
state->garbage = NULL;
- if (!xml) {
+ if (!xml)
xml = gsf_xml_in_doc_new (theme_dtd, NULL);
- go_xml_in_doc_dispose_on_exit (&xml);
- }
gsf_xml_in_push_state (xin, xml, state, (GsfXMLInExtDtor) parse_done_cb, attrs);
}
@@ -1597,10 +1595,8 @@ theme_load_from_uri (char const *uri)
state.desc = state.lang = state.name = NULL;
state.langs = g_get_language_names ();
state.name_lang_score = state.desc_lang_score = G_MAXINT;
- if (!xml) {
+ if (!xml)
xml = gsf_xml_in_doc_new (theme_dtd, NULL);
- go_xml_in_doc_dispose_on_exit (&xml);
- }
if (!gsf_xml_in_doc_parse (xml, input, &state))
g_warning ("[GogTheme]: Could not parse %s", uri);
if (state.theme != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]