Commit 7bc53e2a authored by Manuel Günther's avatar Manuel Günther

Fixed SIGSEGV (turned it into an exception) in extrapolate_mask

parent e9eec07b
......@@ -400,6 +400,10 @@ namespace bob { namespace ip { namespace base {
int true_min_index=blitz::first(column_true);
int true_max_index=blitz::last(column_true);
if (true_min_index < 0 || true_max_index < 0){
throw std::runtime_error("The given mask is invalid as it contains only 'False' values.");
}
// Extrapolate the "non false" columns
for(int jj=true_min_index; jj<=true_max_index; ++jj)
{
......@@ -571,4 +575,3 @@ namespace bob { namespace ip { namespace base {
} } } // namespaces
#endif // BOB_IP_BASE_AFFINE_H
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