summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-10-21 16:07:58 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-10-21 16:07:58 +0200
commitf287d6244133c935f9b22f0e6302e42149ed88f3 (patch)
tree4a53303ceb5a431a320fb47963bfab19c734f4ad
parent1ec558fa5875d4827a246ccfe0ec8de84d5c5076 (diff)
Fix crash if no input and/or output engine has been set.
-rw-r--r--drumgizmo/drumgizmoc.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc
index 6bb4d1a..ba3abfc 100644
--- a/drumgizmo/drumgizmoc.cc
+++ b/drumgizmo/drumgizmoc.cc
@@ -375,6 +375,21 @@ int main(int argc, char* argv[])
return 1;
}
}
+
+ if(ie == nullptr)
+ {
+ std::cerr << "No input engine selected.\n";
+ std::cout << usage(argv[0]);
+ return 1;
+ }
+
+ if(oe == nullptr)
+ {
+ std::cerr << "No output engine selected.\n";
+ std::cout << usage(argv[0]);
+ return 1;
+ }
+
std::cout << "Using kitfile: " << kitfile << std::endl;
DrumGizmo gizmo(settings, *oe.get(), *ie.get());