From d66b0127223114bdcca550ab39ec3d4e94d270ba Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Thu, 28 Mar 2019 18:53:52 -0700 Subject: [PATCH] BUG FIX when there is no usedSettings --- src/Tuner/searchtuner.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tuner/searchtuner.cc b/src/Tuner/searchtuner.cc index 9ab6d45..3cf94fb 100644 --- a/src/Tuner/searchtuner.cc +++ b/src/Tuner/searchtuner.cc @@ -175,7 +175,8 @@ bool SearchTuner::isSubTunerof(SearchTuner *newTuner) { SearchTuner *SearchTuner::copyUsed() { SearchTuner *tuner = new SearchTuner(); - SetIteratorTunableSetting *iterator = usedSettings.iterator(); + + SetIteratorTunableSetting *iterator = !usedSettings.isEmpty()? usedSettings.iterator():settings.iterator(); while (iterator->hasNext()) { TunableSetting *setting = iterator->next(); TunableSetting *copy = new TunableSetting(setting); -- 2.34.1