summaryrefslogtreecommitdiffstats
path: root/src/Data
diff options
context:
space:
mode:
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);
}
};