From f287d6244133c935f9b22f0e6302e42149ed88f3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 21 Oct 2017 16:07:58 +0200 Subject: Fix crash if no input and/or output engine has been set. --- drumgizmo/drumgizmoc.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drumgizmo') 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()); -- cgit v1.2.3