summaryrefslogtreecommitdiffstats
path: root/src/Data
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-04-11 12:04:04 +0200
committerneoraider <devnull@localhost>2008-04-11 12:04:04 +0200
commitb27a517af7b8b99733622193a380bb3ef6674bcc (patch)
tree6c47ea231462c0c8a329788643032b71951a7e74 /src/Data
parent3e81e7e05f888eadd81385768baa3ff0c1821452 (diff)
downloadzoomedit-b27a517af7b8b99733622193a380bb3ef6674bcc.tar
zoomedit-b27a517af7b8b99733622193a380bb3ef6674bcc.zip
zoomedit:
* Instance: Added createLevel and loadLevel methods.
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Info.cpp6
-rw-r--r--src/Data/Info.h4
2 files changed, 6 insertions, 4 deletions
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<xmlpp::Element*>(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<xmlpp::Element*>(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);
}
};