firstAnchestorOrThisOfType : Initialize returnvalue to NULL

This commit is contained in:
Jacob Støren 2015-08-14 15:17:03 +02:00
parent f5d15c19e1
commit d3b1af3724

View File

@ -103,6 +103,8 @@ namespace caf
template <typename T>
void PdmObjectHandle::firstAnchestorOrThisOfType(T*& ancestor) const
{
ancestor = NULL;
// Check if this matches the type
const T* objectOfType = dynamic_cast<const T*>(this);