Skip to content
Snippets Groups Projects
Commit 2aea6018 authored by Victor Poughon's avatar Victor Poughon
Browse files

Fix coverity #1266767, #1266768

parent 4dbd1f36
No related branches found
No related tags found
No related merge requests found
......@@ -62,10 +62,12 @@ QtProgressBar::ProcessEvent( itk::Object * caller,
::itk::ProcessObject::Pointer process =
dynamic_cast< itk::ProcessObject *>( caller );
const int value2 = static_cast<int>(
process->GetProgress() * this->maximum() );
emit SetValueChanged( value2 );
if (process)
{
const int value2 = static_cast<int>(
process->GetProgress() * this->maximum() );
emit SetValueChanged( value2 );
}
}
}
......@@ -78,10 +80,13 @@ QtProgressBar::ConstProcessEvent( const itk::Object * caller,
itk::ProcessObject::ConstPointer process =
dynamic_cast< const itk::ProcessObject *>( caller );
const int v = static_cast<int>(
process->GetProgress() * this->maximum() );
if (process)
{
const int v = static_cast<int>(
process->GetProgress() * this->maximum() );
emit SetValueChanged( v );
emit SetValueChanged( v );
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment