partial fix for repeated algorithm registration (patch #2101 by Stephan Reuter)

pull/2/head
Vadim Pisarevsky 13 years ago
parent d56b771963
commit 562838e0b5
  1. 3
      modules/core/src/algorithm.cpp

@ -321,7 +321,8 @@ AlgorithmInfo::AlgorithmInfo(const string& _name, Algorithm::Constructor create)
{ {
data = new AlgorithmInfoData; data = new AlgorithmInfoData;
data->_name = _name; data->_name = _name;
alglist().add(_name, create); if (!alglist().find(_name, create))
alglist().add(_name, create);
} }
AlgorithmInfo::~AlgorithmInfo() AlgorithmInfo::~AlgorithmInfo()

Loading…
Cancel
Save