BUG FIX when there is no usedSettings
authorHamed Gorjiara <hgorjiar@uci.edu>
Fri, 29 Mar 2019 01:53:52 +0000 (18:53 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Fri, 29 Mar 2019 01:53:52 +0000 (18:53 -0700)
src/Tuner/searchtuner.cc

index 9ab6d45..3cf94fb 100644 (file)
@@ -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);