Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/parser.cc')
-rw-r--r--src/core/parser.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/parser.cc b/src/core/parser.cc
index 953cd50..22b2fc3 100644
--- a/src/core/parser.cc
+++ b/src/core/parser.cc
@@ -47,10 +47,13 @@ bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity)
}
} else if (inifile.got_key_string("info", strval)) {
- if (!entity->info()) {
- entity->set_info(new Info(Entity::infotype(), entity->label().c_str()));
+
+ Info *info = Info::find(entity->info());
+ if (!info) {
+ info = new Info(Entity::infotype(), entity->label().c_str());
+ entity->set_info(info);
}
- entity->info()->add_text(strval);
+ info->add_text(strval);
return true;
} else if (inifile.got_key_label("label", strval)) {