Commit 588bee169b418f43c80612cea04a5d4479f789ff
1 parent
6c9e2226
Contract on an empty src should not yield a dst with one element
Showing
1 changed file
with
1 additions
and
0 deletions
openbr/plugins/meta.cpp
| @@ -265,6 +265,7 @@ class ContractTransform : public UntrainableMetaTransform | @@ -265,6 +265,7 @@ class ContractTransform : public UntrainableMetaTransform | ||
| 265 | virtual void project(const TemplateList &src, TemplateList &dst) const | 265 | virtual void project(const TemplateList &src, TemplateList &dst) const |
| 266 | { | 266 | { |
| 267 | //dst = Expanded(src); | 267 | //dst = Expanded(src); |
| 268 | + if (src.empty()) return; | ||
| 268 | Template out; | 269 | Template out; |
| 269 | 270 | ||
| 270 | foreach (const Template & t, src) { | 271 | foreach (const Template & t, src) { |