From 67cec741e5f22c0ca4e95c1074e5f24a36d95889 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Tue, 8 Apr 2014 13:55:11 -0400 Subject: [PATCH] Stream project(Template,Template) won't crash if the destination templatelist within the function is empty --- openbr/plugins/stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/stream.cpp b/openbr/plugins/stream.cpp index b0e4ec8..fb2d1fd 100644 --- a/openbr/plugins/stream.cpp +++ b/openbr/plugins/stream.cpp @@ -1315,7 +1315,7 @@ public: in.append(src); TemplateList out; CompositeTransform::project(in,out); - dst = out.first(); + if (!out.isEmpty()) dst = out.first(); if (out.size() > 1) qDebug("Returning first output template only"); } @@ -1326,7 +1326,7 @@ public: in.append(src); TemplateList out; projectUpdate(in,out); - dst = out.first(); + if (!out.isEmpty()) dst = out.first(); if (out.size() > 1) qDebug("Returning first output template only"); } -- libgit2 0.21.4