fixed bugs in loading dynamic profiles

This commit is contained in:
Alberto Griggio
2017-03-03 10:00:19 +01:00
parent 6ae57cd556
commit eeb2da2613
4 changed files with 20 additions and 7 deletions

View File

@@ -18,6 +18,7 @@
*/
#include "dynamicprofile.h"
#include "profilestore.h"
#include <stdlib.h>
#include <glibmm/regex.h>
@@ -235,13 +236,13 @@ PartialProfile *loadDynamicProfile(const ImageMetaData *im)
if (entry.matches(im)) {
printf("found matching profile %s\n",
entry.profilepath.c_str());
PartialProfile p(true, true);
if (!p.load(options.findProfilePath(entry.profilepath))) {
p.applyTo(ret->pparams);
const PartialProfile *p =
profileStore.getProfile(entry.profilepath);
if (p != nullptr) {
p->applyTo(ret->pparams);
} else {
printf("ERROR loading matching profile\n");
}
p.deleteInstance();
}
}
}