Prevent crash when container has no first element
This commit is contained in:
parent
67f2802e77
commit
82e8d28bdd
|
@ -14,7 +14,7 @@ set(META_GUI_OPTIONAL true)
|
|||
set(META_JS_SRC_DIR renamingutility)
|
||||
set(META_VERSION_MAJOR 3)
|
||||
set(META_VERSION_MINOR 3)
|
||||
set(META_VERSION_PATCH 5)
|
||||
set(META_VERSION_PATCH 6)
|
||||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||
|
||||
# add project files
|
||||
|
|
|
@ -834,7 +834,9 @@ public:
|
|||
|
||||
template <class ContainerType> void mkElementTree(ContainerType *container)
|
||||
{
|
||||
mkElementNode(container->firstElement());
|
||||
if (container->firstElement()) {
|
||||
mkElementNode(container->firstElement());
|
||||
}
|
||||
for (auto &element : container->additionalElements()) {
|
||||
mkElementNode<typename ContainerType::ContainerElementType, true>(element.get());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue