From 562838e0b57e7c73e26588822ddbdda1c91e8e5b Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sun, 1 Jul 2012 21:14:16 +0000 Subject: [PATCH] partial fix for repeated algorithm registration (patch #2101 by Stephan Reuter) --- modules/core/src/algorithm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/src/algorithm.cpp b/modules/core/src/algorithm.cpp index 7c783ea6b6..3fedfaa481 100644 --- a/modules/core/src/algorithm.cpp +++ b/modules/core/src/algorithm.cpp @@ -321,7 +321,8 @@ AlgorithmInfo::AlgorithmInfo(const string& _name, Algorithm::Constructor create) { data = new AlgorithmInfoData; data->_name = _name; - alglist().add(_name, create); + if (!alglist().find(_name, create)) + alglist().add(_name, create); } AlgorithmInfo::~AlgorithmInfo()