Commit 4cb891c435963c22dc147346fc84819f78e2b996

Authored by Austin Van Blanton
1 parent a0f729f5

Check for empty src in First

Showing 1 changed file with 4 additions and 0 deletions
openbr/plugins/misc.cpp
... ... @@ -179,6 +179,10 @@ class FirstTransform : public UntrainableMetaTransform
179 179  
180 180 void project(const Template &src, Template &dst) const
181 181 {
  182 + // AggregateFrames will leave the Template empty
  183 + // if it hasn't filled up the buffer
  184 + // so we gotta anticipate an empty Template
  185 + if (src.empty()) return;
182 186 dst.file = src.file;
183 187 dst = src.m();
184 188 }
... ...