mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
check vector emptiness before access it
Signed-off-by: Li Peng <peng.li@intel.com>
This commit is contained in:
@@ -1266,8 +1266,11 @@ struct Net::Impl
|
||||
|
||||
if ( preferableTarget == DNN_TARGET_OPENCL )
|
||||
{
|
||||
nextData = &layers[activData->consumers[0].lid];
|
||||
lpNext = LayerPin(activData->consumers[0].lid, 0);
|
||||
if ( !activData->consumers.empty() )
|
||||
{
|
||||
nextData = &layers[activData->consumers[0].lid];
|
||||
lpNext = LayerPin(activData->consumers[0].lid, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user