From 5cc5ebbaa41dd374bd00e3ae45ed1ad31c3f525d Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Mon, 24 Nov 2008 21:27:37 +0000
Subject: Abort if queued module fails to load.

git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1781 a436a847-0d15-0410-975c-d299462d15a1
---
 src/ingen/main.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp
index 7fd4545b..176bba29 100644
--- a/src/ingen/main.cpp
+++ b/src/ingen/main.cpp
@@ -126,8 +126,15 @@ main(int argc, char** argv)
 		engine_module = Ingen::Shared::load_module("ingen_engine");
 		engine_http_module = Ingen::Shared::load_module("ingen_engine_http");
 		engine_osc_module = Ingen::Shared::load_module("ingen_engine_osc");
-		engine_queued_module = Ingen::Shared::load_module("ingen_engine_queued");
 		engine_jack_module = Ingen::Shared::load_module("ingen_engine_jack");
+		engine_queued_module = Ingen::Shared::load_module("ingen_engine_queued");
+
+		if (!engine_queued_module) {
+			cerr << "ERROR: Unable to load (queued) engine interface module" << endl;
+			Ingen::Shared::destroy_world();
+			return 1;
+		}
+
 		if (engine_module) {
 			Engine* (*new_engine)(Ingen::Shared::World* world) = NULL;
 			if (engine_module->get_symbol("new_engine", (void*&)new_engine)) {
-- 
cgit v1.2.1