[gxml] GomDocument: Fix search for default root node
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] GomDocument: Fix search for default root node
- Date: Thu, 21 Mar 2019 23:56:54 +0000 (UTC)
commit 198ddb50bad99e34ac7dd6ed2694fe3039dc1d84
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Mar 21 17:39:58 2019 -0600
GomDocument: Fix search for default root node
Before this change, no root property is found and instantiated
gxml/GomDocument.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gxml/GomDocument.vala b/gxml/GomDocument.vala
index d688290..795125a 100644
--- a/gxml/GomDocument.vala
+++ b/gxml/GomDocument.vala
@@ -111,8 +111,8 @@ public class GXml.GomDocument : GomNode,
if (spec.value_type.is_a (typeof (GomElement))) {
Value val = Value (Type.OBJECT);
get_property (spec.name, ref val);
- var roote = val.get_object () as GomElement;
- if (roote == null) {
+ obj = val.get_object () as GomElement;
+ if (obj == null) {
obj = Object.new (spec.value_type,"owner-document", this.owner_document);
try { this.append_child (obj as GomElement); }
catch (GLib.Error e) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]