summaryrefslogtreecommitdiff
path: root/src/drumkitparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 08:35:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 08:35:53 +0200
commit2699cb7d324ffb1d2adc62e1f62434397aa39e2d (patch)
tree7c3d37fadbdbe8f70ed8202f6941272ba966133e /src/drumkitparser.cc
parent6e3b53cd1b0fc6dcd721fac3beb699cb722e1e23 (diff)
Use new load return value from ConfigFile.
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;