From 6e25fe256958987c91f66ae990b1efca56b1e494 Mon Sep 17 00:00:00 2001 From: astridkbjorke Date: Mon, 19 Dec 2016 10:05:57 +0100 Subject: [PATCH] AppFwk: Added comments --- .../cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp index 7bc8540cdb..03210da89d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiOrdering.cpp @@ -94,6 +94,9 @@ bool PdmUiOrdering::contains(const PdmUiItem* item) void PdmUiOrdering::add(const PdmFieldHandle* field) { PdmUiFieldHandle* uiItem = const_cast(field)->uiCapability(); + + // No uiItem can be caused by missing initialization using CAF_PDM_InitField + assert(uiItem); assert(!this->contains(uiItem)); @@ -106,6 +109,9 @@ void PdmUiOrdering::add(const PdmFieldHandle* field) void PdmUiOrdering::add(const PdmObjectHandle* obj) { PdmUiObjectHandle* uiItem = uiObj(const_cast(obj)); + + // No uiItem can be caused by missing initialization using CAF_PDM_InitObject + assert(uiItem); assert(!this->contains(uiItem));