Commit 8b418541d8cc1faafd58ec431baedb6ba396865b

Authored by Josh Klontz
1 parent c51200fa

janus_finalize_template should skip over empty templates

Showing 1 changed file with 3 additions and 0 deletions
openbr/janus.cpp
... ... @@ -77,6 +77,9 @@ janus_error janus_finalize_template(janus_template template_, janus_flat_templat
77 77 {
78 78 *bytes = 0;
79 79 foreach (const cv::Mat &m, *template_) {
  80 + if (!m.data)
  81 + continue;
  82 +
80 83 if (!m.isContinuous())
81 84 return JANUS_UNKNOWN_ERROR;
82 85  
... ...