[gthumb] load dom from xml: do not emit a warning if the xml is null



commit 2319f7c220e826eefeae4443ea7116620c05d8df
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Mar 23 10:32:00 2014 +0100

    load dom from xml: do not emit a warning if the xml is null

 gthumb/dom.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/dom.c b/gthumb/dom.c
index 4dc1f89..a0b0c5a 100644
--- a/gthumb/dom.c
+++ b/gthumb/dom.c
@@ -649,7 +649,9 @@ dom_document_load (DomDocument  *self,
        GMarkupParseContext *context;
 
        g_return_val_if_fail (DOM_IS_DOCUMENT (self), FALSE);
-       g_return_val_if_fail (xml != NULL, FALSE);
+
+       if (xml == NULL)
+               return FALSE;
 
        g_queue_clear (self->priv->open_nodes);
        g_queue_push_head (self->priv->open_nodes, self);


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