diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-09-29 21:39:15 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-09-29 21:39:15 +0100 |
commit | 30d8160890749d98b539ab39af6025ec6ded2c78 (patch) | |
tree | a1a537bc533d777f203c802cc640be357e69b6fd | |
parent | Lots of functionality move to non-template base (diff) | |
download | slicer-30d8160890749d98b539ab39af6025ec6ded2c78.tar.bz2 slicer-30d8160890749d98b539ab39af6025ec6ded2c78.tar.xz slicer-30d8160890749d98b539ab39af6025ec6ded2c78.zip |
Don't attempt to get metadata of class we don't have a definition for
-rw-r--r-- | slicer/tool/parser.cpp | 6 |
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; } |