summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/m_config.c4
-rw-r--r--core/m_config.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/core/m_config.c b/core/m_config.c
index 84713276df..b5d1c3fefd 100644
--- a/core/m_config.c
+++ b/core/m_config.c
@@ -253,6 +253,8 @@ struct m_config *m_config_new(void *optstruct,
config->includefunc = includefunc;
}
+ config->use_profiles = true;
+
return config;
}
@@ -542,7 +544,7 @@ static int m_config_parse_option(struct m_config *config, void *optstruct,
if (config->includefunc && !bstrcmp0(name, "include")) {
return parse_include(config, param, set);
- } else if (!bstrcmp0(name, "profile"))
+ } else if (config->use_profiles && !bstrcmp0(name, "profile"))
return parse_profile(config, co->opt, name, param, set);
// Option with children are a bit different to parse
diff --git a/core/m_config.h b/core/m_config.h
index 28983944df..35955cfa4b 100644
--- a/core/m_config.h
+++ b/core/m_config.h
@@ -87,6 +87,7 @@ typedef struct m_config {
void *optstruct; // struct mpopts or other
int (*includefunc)(struct m_config *conf, char *filename);
+ bool use_profiles;
} m_config_t;
// Create a new config object.