summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-04-19 22:59:50 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-04-19 22:59:50 +0200
commitbc4f25337e048db7d7ec86cfb116cc3768473ff5 (patch)
tree7828f7a54a14c6e4d605b021f81c280dba955df6 /src/drumgizmo.cc
parentabc0caf95536a4001615f863860a091d6bc55973 (diff)
More pointer sanity checks
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index ba167b4..c30147f 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -263,9 +263,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
i = kit.instruments[d];
}
- if(!i->isValid()) continue;
-
- if(i == NULL) {
+ if(i == NULL || !i->isValid()) {
ERR(drumgizmo, "Missing Instrument %d.\n", evs[e].instrument);
continue;
}