From b27a517af7b8b99733622193a380bb3ef6674bcc Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 11 Apr 2008 10:04:04 +0000 Subject: zoomedit: * Instance: Added createLevel and loadLevel methods. --- src/Data/Info.cpp | 6 ++++-- src/Data/Info.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Data') diff --git a/src/Data/Info.cpp b/src/Data/Info.cpp index 28b85db..f0ce024 100644 --- a/src/Data/Info.cpp +++ b/src/Data/Info.cpp @@ -24,10 +24,12 @@ namespace Data { Info::Info(xmlpp::Element *node) { nameNode = dynamic_cast(node->get_children("name").front()); - name = nameNode->get_child_text()->get_content(); + if(nameNode->has_child_text()) + name = nameNode->get_child_text()->get_content(); descNode = dynamic_cast(node->get_children("desc").front()); - desc = descNode->get_child_text()->get_content(); + if(descNode->has_child_text()) + desc = descNode->get_child_text()->get_content(); } } diff --git a/src/Data/Info.h b/src/Data/Info.h index 1678b81..f9343d2 100644 --- a/src/Data/Info.h +++ b/src/Data/Info.h @@ -43,7 +43,7 @@ class Info { void setName(const Glib::ustring &n) { name = n; - nameNode->get_child_text()->set_content(n); + nameNode->set_child_text(n); } const Glib::ustring& getDescription() const { @@ -52,7 +52,7 @@ class Info { void setDescription(const Glib::ustring &d) { desc = d; - descNode->get_child_text()->set_content(d); + descNode->set_child_text(d); } }; -- cgit v1.2.3