We are currently fixing T4069 in the QmitkImageStatisticsView.cpp and stumbled upon the following code snippet ( lines 302-311 as of revision 23097 )
do { parentObjects = this->GetDefaultDataStorage()->GetSources( selectedNode ); if ( parentObjects->Size() > 0 ) { // Use first parent object (if multiple parents are present) parentNode = parentObjects->ElementAt( 0 ); parentImage = dynamic_cast< mitk::Image * >( parentNode->GetData() ); } } while ( (parentImage == NULL) && (parentObjects->Size() != 0) );
is there a reason for the do while statement? It looks like it was supposed to iterate through the parentObjects, but should the dynamic_cast return a NULL Pointer it seems to enter an infinite loop instead.