fixed segmentation fault in loadSettings()
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@422 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
9b7587182a
commit
4d38452950
@ -99,7 +99,9 @@ void Settings::loadSettings(const QString & fileName)
|
||||
if(value.isValid())
|
||||
{
|
||||
QString str = value.toString();
|
||||
if(str.contains(";") && str.size() != getParameter(key).toString().size())
|
||||
if(str.contains(";"))
|
||||
{
|
||||
if(str.size() != getParameter(key).toString().size())
|
||||
{
|
||||
// If a string list is modified, update the value
|
||||
// (assuming that index < 10... one character for index)
|
||||
@ -123,7 +125,7 @@ void Settings::loadSettings(const QString & fileName)
|
||||
Settings::defaultFeature2D_1Detector().split(':').last().split(";").at(indexInt).toStdString().c_str());
|
||||
}
|
||||
}
|
||||
if(key.compare(Settings::kFeature2D_2Descriptor()) == 0)
|
||||
else if(key.compare(Settings::kFeature2D_2Descriptor()) == 0)
|
||||
{
|
||||
if(index == '2' || index == '3')
|
||||
{
|
||||
@ -135,7 +137,7 @@ void Settings::loadSettings(const QString & fileName)
|
||||
Settings::defaultFeature2D_2Descriptor().split(':').last().split(";").at(indexInt).toStdString().c_str());
|
||||
}
|
||||
}
|
||||
if(key.compare(Settings::kNearestNeighbor_1Strategy()) == 0)
|
||||
else if(key.compare(Settings::kNearestNeighbor_1Strategy()) == 0)
|
||||
{
|
||||
if(index <= '4')
|
||||
{
|
||||
@ -152,6 +154,7 @@ void Settings::loadSettings(const QString & fileName)
|
||||
str[0] = index.toAscii();
|
||||
value = QVariant(str);
|
||||
#endif
|
||||
}
|
||||
setParameter(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user