summaryrefslogtreecommitdiffstats
path: root/src/libs/client/Serializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client/Serializer.cpp')
-rw-r--r--src/libs/client/Serializer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index f0920be5..bf7a745e 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -250,17 +250,18 @@ Serializer::serialize_patch(SharedPtr<PatchModel> patch, const Node& patch_id)
}
}
- for (NodeModelMap::const_iterator n = patch->nodes().begin(); n != patch->nodes().end(); ++n) {
+ for (ObjectModel::Children::const_iterator n = patch->children().begin(); n != patch->children().end(); ++n) {
SharedPtr<PatchModel> patch = PtrCast<PatchModel>(n->second);
+ SharedPtr<NodeModel> node = PtrCast<NodeModel>(n->second);
if (patch) {
const Node subpatch_id = Node(_model->world(), Node::RESOURCE,
patch_id.to_string() + "#" + patch->path().substr(1));
_model->add_statement(patch_id, "ingen:node", subpatch_id);
serialize_patch(patch, subpatch_id);
- } else {
+ } else if (node) {
const Node node_id = path_to_node_id(n->second->path());
_model->add_statement(patch_id, "ingen:node", node_id);
- serialize_node(n->second, node_id);
+ serialize_node(node, node_id);
}
}