Commit 1182888a authored by Julien Michel's avatar Julien Michel

BUG: An exception should be thrown when overlay image has less than 3 bands

parent 3a388d0e
......@@ -506,6 +506,11 @@ namespace otb
ImageWidgetBase<TPixel>
::RebuildOpenGlImageOverlayBuffer(void)
{
if(m_ImageOverlay->GetNumberOfComponentsPerPixel()<3)
{
itkExceptionMacro(<<"Image overlay should have at least 3 channels.");
}
//otbMsgDebugMacro(<<"RebuildOpenGlImageOverlayBuffer");
if(m_OpenGlImageOverlayBuffer != NULL)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment