summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r--src/drumkitparser.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 00232b2..f7bfe40 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -38,12 +38,14 @@ DrumKitParser::DrumKitParser(const std::string &file, DrumKit &k)
: kit(k)
, refs(REFSFILE)
{
- refs.load();
-
std::string kitfile = file;
- if(file.size() > 1 && file[0] == '@') {
- kitfile = refs.getValue(file.substr(1));
+ if(refs.load()) {
+ if(file.size() > 1 && file[0] == '@') {
+ kitfile = refs.getValue(file.substr(1));
+ }
+ } else {
+ ERR(drumkitparser, "Error reading refs.conf");
}
// instr = NULL;