summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/tool/parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp
index 99d3f5f..c541ec1 100644
--- a/slicer/tool/parser.cpp
+++ b/slicer/tool/parser.cpp
@@ -552,8 +552,10 @@ namespace Slicer {
if (auto cd = Slice::ClassDeclPtr::dynamicCast(typec)) {
typec = cd->definition();
}
- auto typeMetadata = typec->getMetaData();
- std::copy(typeMetadata.begin(), typeMetadata.end(), std::back_inserter(metadata));
+ if (typec) {
+ auto typeMetadata = typec->getMetaData();
+ std::copy(typeMetadata.begin(), typeMetadata.end(), std::back_inserter(metadata));
+ }
}
return metadata;
}